1. 首页 > 知识 > 技术

npm安装报错(npm ERR! request to https://registry.npm.taobao.org/element-ui failed, reason: certificate )

报错信息:

C:\Users\xxx>npm install yarn -g
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/yarn failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in: C:\Users\xxx\AppData\Local\npm-cache\_logs\2024-01-26T15_08_25_706Z-debug-0.log

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

其原因是官方修改了淘宝镜像源的地址,不管通过npm安装什么都会导致报错

解决办法:

重新安装新的淘宝镜像源:

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

安装后检查一下:

npm config get registry

再通过npm安装就不会执行报错了。

本文由傻鸟发布,不代表傻鸟立场,转载联系作者并注明出处:https://www.shaniao.net/jishu/336.html

加载中~

联系我们

在线咨询:点击这里给我发消息

微信号:

工作日:10:30-15:30,节假日休息