Install fail! Error: certificate has expired
Error: certificate has expired
at TLSSocket.onConnectSecure (_tls_wrap.js:1515:34)
at TLSSocket.emit (events.js:400:28)
at TLSSocket._finishInit (_tls_wrap.js:937:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:709:12)
1、取消ssl验证: npm config set strict-ssl false 这个方法一般就可以解决了。 2、更换npm镜像源: npm config set registry http://registry.cnpmjs.org npm config set registry http://registry.npm.taobao.org npm i -g firebase-tools@latest
然后执行如下命令,好了,关键是“npm cache clean --force”
npm cache clean --force
npm install
原因:之前把网络做了代理,npm就不灵了,网络代理去掉,把npm缓存都删除了,node_moudule文件夹清了,再重新npm就好了
标签:NPM,npm,set,certificate,js,报错,registry,wrap,expired From: https://www.cnblogs.com/hellofangfang/p/18046444