解决vue npm命令安装报错npm ERR! request to https://registry.npm.taobao.org/clipboard failed, reason: certificate has expired问题
侧边栏壁纸
  • 累计撰写 635 篇文章
  • 累计收到 0 条评论

解决vue npm命令安装报错npm ERR! request to https://registry.npm.taobao.org/clipboard failed, reason: certificate has expired问题

加速器之家
2024-08-22 / 0 评论 / 3 阅读 / 正在检测是否收录...

在使用vue npm安装命令

npm install --registry=https://registry.npm.taobao.org

报如下错误:

npm ERR! code CERT_HAS_EXPIRED

npm ERR! errno CERT_HAS_EXPIRED

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

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\Hm\AppData\Roaming\npm-cache\_logs\2024-06-20T06_33_14_083Z-debug.log

这个错误是淘宝的镜像连接已经失效了,2024年淘宝镜像没更新时间证书,可以换成一下的镜像

npm config set registry https://mirrors.huaweicloud.com/repository/npm/

或者

npm config set registry https://registry.npmjs.org/

再次执行安装

npm install --registry=https://mirrors.huaweicloud.com/repository/npm/

或者

npm config set registry https://registry.npmjs.org/
0

评论

博主关闭了当前页面的评论