好久没运行的代码,打开运行时提示需要npm install相关包,执行之后报错:
request to https://registry.npm.taobao.org/zrender failed, reason: certificate has expired(证书过期)
先查看npm 配置
npm config list
结果如下
发现我之前使用的镜像https://registry.npm.taobao.org/
- 清除缓存,并确认环境是否清楚干净
npm cache clean --force
npm cache verify
- 设置新的镜像源,并验证是否设置成功
npm config set registry https://registry.npmmirror.com
npm config get registry
结束!