[windows]npm拉包时提示taobao镜像源SSL证书错误的解决方式
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证书已经过期,此时如果用
npm cache clean --force
npm config set registry https://registry.npmmirror.com/
或者用
npm config set strict-ssl false
都不能解决问题的情况下,应该是用户目录下的.npmrc文件存在老taobao的镜像指定,
此时,需要打开C:\Users\[替换为你的用户名称]\.npmrc,删除上述红框中关于老taobao 路径的内容,重新执行npm拉包命令即可。