欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-03-04 16:31:52
1.安装vue-cli 2.初始化项目 此时报错:vue-cli · Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect ECONNREFU ......

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

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

解决方案:查看npm设置

npm config ls -l

发现果然有问题

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

删除代理:

npm config delete http-proxy

再次查看,没有了。

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

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

vue init webpack project

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

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

npm start

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