npm切换镜像源

最开始用 淘宝镜像,今天突然不能用了

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

 报这些错,我以为是自己的问题,重启,清缓存重启没啥用,换成华为的就好了。。。

PS D:\code\web> npm install axios
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/axios failed, reason: certificate has expired

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

换成华为镜像

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

你可能感兴趣的:(npm,前端,node.js)