npm报错:request to https://registry.npm.taobao.org failed

309 阅读1分钟

request to https://registry.npm.taobao.org failed, reason certificate has expired

报错问题:

提示淘宝镜像过期

解决方案

1、清空缓存:npm cache clean --force

2、然后修改镜像即可:npm config set registry https://registry.npmjs.org/ (或npm config delete registry

!!!注意:此处修改的镜像用的是npm本身,一般国内用户还是建议使用淘宝镜像,所以推荐还是设置成用淘宝镜像,执行:npm config set registry https://registry.npmmirror.com【推荐】

参考链接:blog.csdn.net/weixin_4523…