
npm报错:request to https://registry.npm.taobao.org failed, reason certificate has expired
解决npm淘宝镜像报错问题
·
背景:
在另一个项目中下载富文本插件的时候报错,提示淘宝镜像过期了。需要更新。
解决方案:
1、查看当前的npm镜像设置:npm config list
发现果然还是registry.npm.taobao.org
2、清空缓存:npm cache clean --force
3、修改镜像:
- 修改npm本身:npm config set registry https://registry.npmjs.org/ (或npm config delete registry)
- 设置成淘宝镜像(推荐):npm config set registry https://registry.npmmirror.com
4、 查看当前的npm镜像设置:npm config list。发现设置成功
更多推荐
所有评论(0)