问题描述
友友们! 好久不见。今早在项目中安装tweenjs的时候发现npm 半天安装不了,最后抛出错误:
npm ERR! request to https://registry.npm.taobao.org/@tweenjs%2ftween.js failed, reason: certificate has expired
.
如下图:
解决办法
根据错误提示信息,是由于原淘宝npm镜像地址:“ https://registry.npm.taobao.org ” 的证书失效
// 原来的是
npm config set registry https://registry.npm.taobao.org
// 修改为
npm config set registry https://registry.npmmirror.com
再次安装就可以啦!