@IT·互联网

npm淘宝镜像报错 reason: certificate ha

2024-03-13  本文已影响0人  small_Sun

我们在执行设置淘宝镜像时突然报了
npm ERR! request to https://registry.npm.taobao.org/concurrently failed, reason: certificate has expired

原因: 淘宝镜像原地址2024年1月22日已过期


image.png

解决:别担心,我们只需要将命令替换成 下面镜像即可解决

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

或者可以换成其他镜像也可以

npm 官方原始镜像网址是:https://registry.npmjs.org/
淘宝最新 NPM 镜像:https://registry.npmmirror.com
阿里云 NPM 镜像:https://npm.aliyun.com
腾讯云 NPM 镜像:https://mirrors.cloud.tencent.com/npm/
华为云 NPM 镜像:https://mirrors.huaweicloud.com/repository/npm/
网易 NPM 镜像:https://mirrors.163.com/npm/
中科院大学开源镜像站:http://mirrors.ustc.edu.cn/
清华大学开源镜像站:https://mirrors.tuna.tsinghua.edu.cn/

如果执行完后依旧是报同样的报错,请依次执行以下两行命令

npm cache clean --force
npm config set strict-ssl false

然后再重新安装

npm install
上一篇下一篇

猜你喜欢

热点阅读