[windows]npm拉包时提示taobao镜像源SSL证书错误的解决方式

[windows]npm拉包时提示taobao镜像源SSL证书错误的解决方式

编程文章jaq1232025-06-05 15:54:5715A+A-

npm拉包时提示taobao镜像源SSL证书错误。

错误现象:

Error installing Chromedriver: Hostname/IP does not match certificate's altnames: Host: npm.taobao.org. is not in the cert's altnames

错误原因:

淘宝镜像的SSL证书已经过期,此时如果用

Bash
npm cache clean --force
npm config set registry https://registry.npmmirror.com/

或者用

Bash
npm config set strict-ssl false

都不能解决问题的情况下,应该是用户目录下的.npmrc文件存在老taobao的镜像指定,


此时,需要打开C:\Users\[替换为你的用户名称]\.npmrc,删除上述红框中关于老taobao 路径的内容,重新执行npm拉包命令即可。

点击这里复制本文地址 以上内容由jaq123整理呈现,请务必在转载分享时注明本文地址!如对内容有疑问,请联系我们,谢谢!

苍茫编程网 ©2025 All Rights Reserved.  蜀ICP备2024111239号-21