安装vue-cli更换镜像地址

如果使用 npm install -g vue-cli 安装vue-cli出现一下问题,则可以配置更换npm的镜像地址

npm ERR! request to https://registry.npmjs.org/vue-cli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net"

通过此命令更换npm的镜像地址

npm config set registry https://registry.npm.taobao.org

安装vue-cli

npm install -g vue-cli

转载至链接:https://my.oschina.net/u/2426590/blog/1940727

 

 

你可能感兴趣的:(vue)