npm install 报错 解决 RequestError: certificate has expired
发表日期:2024-03-26 17:19:00 | 来源: | | 浏览(939) 分类:前端开发
最近跑之前写的electron项目,各种报错,如
npm install 报错 RequestError: certificate has expired
HTTPError: Response code 404 (Not Found) for https://registry.npmmirror.com/electron/XXXXX
总之各种报错基本上是npm源的问题
按如下解决:
npm config set disturl https://registry.npmmirror.com/dist/ npm config set registry https://registry.npmmirror.com npm config set electron_mirror https://npmmirror.com/mirrors/electron/ npm config set strict-ssl false npm cache clean --force npm install
好了,这就可以解决99%的npm问题了。
1%没成功的看一下自己npm配置是不是输入错了
npm config get