npm install -g cnpm --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.t...-Go服务器开发" />

ZBLOG

C:\Windows\System32>npm config set cafile "D:\cacert.pem" C:\Windows\System32>npm install -g cnpm --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.t...

这个错误是由于 npm 镜像源的证书已过期导致的。你可以尝试更新 npm 的证书来解决这个问题,具体步骤如下:

  1. 下载最新的 Node.js 安装包,并进行安装:https://nodejs.org/
  2. 使用命令行工具打开 cmd 或者 PowerShell 窗口。
  3. 运行以下命令更新 npm 的证书:
    
    npm config set cafile "D:\cacert.pem"
    npm config set strict-ssl false
    
  4. 然后再次运行安装 cnpm 的命令:
    
    npm install -g cnpm --registry=https://registry.npm.taobao.org
    

通过以上步骤,你应该能够成功更新 npm 的证书并安装 cnpm。如果还有其他问题,请查看相应的日志文件以获取更多详细信息。


内容由零声教学AI助手提供,问题来源于学员提问

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:npm install -g cnpm --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.t...">https://golang.0voice.com/?id=18568

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

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

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?