在使用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)