很久不用 npm 了。。。

今天拉了一个新项目跑跑,结果第一步 npm install 就报错了:

$ npm install
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/v-select2-component failed, reason: certificate has expired

原因是 certificate has expired,也就是 SSL 证书过期了。

打开 https://registry.npm.taobao.org/ 一看,果然,不过跳过(忽略证书错误)之后,直接 301 跳转到 https://registry.npmmirror.com/ ,搜了一下,原来官方早就宣布过了。。。

以后得换了:

npm config set registry https://registry.npmmirror.com

标签: npm, npmmirror

添加新评论