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
解决方案:查看npm设置
npm config ls -l
发现果然有问题
删除代理:
npm config delete http-proxy
再次查看,没有了。
初始化项目 vue init webpack project大功告成
vue init webpack project
切换到project目录,赶快npm start 启动你的项目吧!
npm start