vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED

1.安装vue-cli 

npm install vue-cli -g

2.初始化项目

vue init webpack project

此时报错:vue-cli · Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:8118

解决方案:查看npm设置

npm config ls -l

发现果然有问题

vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED_第1张图片

删除代理:

npm config delete http-proxy

再次查看,没有了。

vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED_第2张图片

初始化项目 vue init webpack project大功告成

vue init webpack project

vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED_第3张图片

切换到project目录,赶快npm start 启动你的项目吧!

npm start

vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED_第4张图片

转载于:https://www.cnblogs.com/smilebai/p/9169055.html

你可能感兴趣的:(vue-cli 项目安装失败 tunneling socket could not be established, cause=connect ECONNREFUSED)