共计 497 个字符,预计需要花费 2 分钟才能阅读完成。
记录一次简单的报错,在执行 npm install 报错:
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: D:Program Filesnodejsnode_cache_logs2024-04-28T02_05_00_993Z-debug-0.log
如图:
解决方式
1. 手动设置 npm 镜像源
npm config set registry https://registry.npm.taobao.org/
2. 清理 npm 缓存
npm cache clean --force
原文地址: 【问题解决】npm ERR! code CERT_HAS_EXPIREDnpm ERR! errno CERT_HAS_EXPIREDnpm ERR! request to
正文完