[英]Unable to install vue-cli using npm
我已经安装了最新版本的npm
,并尝试使用以下命令安装vue-cli
npm install --global vue-cli
但我遇到了以下问题:
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/vue-cli failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pd0ufv\AppData\Roaming\npm-cache\_logs\2018-02-02T17_02_16_113Z-debug.log
我也使用设置了我的代理设置
npm set http-proxy <proxy>
npm set https-proxy <proxy>
但效果不佳。 我正在使用npm
版本 5.6.0。
大多数情况下,此错误是因为您背后的防火墙实际上并不支持 SSL 对等互连,但如果您使用其http
直通,则会模仿它,因此相应地更改您的https-proxy
定义:
npm set https-proxy http://example.com
使用以下步骤:
npm 缓存清理 --force
npm install -g @vue/cli
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.