今年在安装脚手架的时候使用命令:npm install -g @vue/cli
发现报错:request to https://registry.npm.taobao.org/@vue%2fcli failed, reason: certificate has expired证书已过期,查看了下旧的地址已经不适用了
接解决办法:
1、查看下当前的下载源:
npm config get registry
2.设置新下载源:
旧的地址:https://registry.npm.taobao.org
现在更换为:https://registry.npmmirror.com
执行下面命令更换源:
npm config set registry https://registry.npmmirror.com
3.再次查看当前下载源
npm config get registry
4.如果是报错那下面就不用看了,已经解决了
继续执行已经可以了:
npm install -g @vue/cli
关掉命令行执行命令:
vue -V
原文链接:https://blog.csdn.net/suxiexingchen/article/details/139531134
标签:npm,VUE,config,vue,报错,registry,https,安装 From: https://www.cnblogs.com/huandong963/p/18451425