尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

Node.js 安装报错npm error request to httpsregistry.npm.taobao.orgcnpm failed, reason certificate ha

Node.js 安装报错npm error request to httpsregistry.npm.taobao.orgcnpm failed, reason certificate ha npm error request to https://registry.npm.taobao.org/cnpm failed, reason: certificate has expired是因为npm错误请求https://registry.npm.taobao.org/cnpm失败原因证书已过期2024年1月22日淘宝NPM镜像站的域名 registry.npm.taobao.org 的SSL证书过期解决方案1、清除npm缓存npm cache clean --force如果报一下错误是因为npm版本过高的问题可以使用新版清除npm缓存的命令npm cache verify2、切换到新的npm镜像站npm config get registry执行返回的是 https://registry.npmjs.org/说明切换成功了3、使用新镜像安装cnpmnpm install -g cnpm --registryhttps://registry.npmmirror.com耐心等待一下执行完成结果后续可以使用cnpm安装需要的镜像4、验证是否成功cnpm -v
返回列表