Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,

简介: Mac电脑npm:Failed to download repo vuejs-templates/webpack: tunneling socket could not be established,

博主最近在使用vue时,通过:

vue init webpack vuecliTest

时一直报错:

Failed to download repo vuejs-templates/webpack: tunneling socket could not be established, cause=connect ETIMEDOUT


多方寻求答案无果,最后找到一种方法来解决:

npm config rm proxy
npm config rm https-proxy

输入以上命令行继续执行即可。


但是这里要注意一个问题,Mac环境下使用npm时最好加上sudo,并且npm加上c为cnpm来使用。


最后的结果为

sudo vue init webpack vuecliTest

完整的执行代码放下面:

sudo cnpm install --global vue-cli
sudo vue init webpack my-project
cd my-project
npm install
npm run dev
目录
打赏
0
0
0
0
2
分享
相关文章
mac电脑也是用postman吗
postman是外国的软件,速度和用户体验没有国内的api测试软件好。国内可以使用yunedit-post代替postman来做接口测试。
39 7
Cua:Mac用户狂喜!这个开源框架让AI直接接管你的电脑,快速实现AI自动化办公
Cua是一个结合高性能虚拟化与AI代理能力的开源框架,能在Apple Silicon上以接近原生性能运行虚拟机,并让AI直接操作系统应用。
147 17
Cua:Mac用户狂喜!这个开源框架让AI直接接管你的电脑,快速实现AI自动化办公
苹果app上架app store 之苹果开发者账户在mac电脑上如何使用钥匙串访问-发行-APP发布证书ios_distribution.cer-优雅草卓伊凡
苹果app上架app store 之苹果开发者账户在mac电脑上如何使用钥匙串访问-发行-APP发布证书ios_distribution.cer-优雅草卓伊凡
66 8
苹果app上架app store 之苹果开发者账户在mac电脑上如何使用钥匙串访问-发行-APP发布证书ios_distribution.cer-优雅草卓伊凡
vue中npm打包遇到× eslint —fix found some errors. Please fix them and try committing again.husky > pre-commit hook failed (add —no-verify to bypass)报错解决方案-卓伊凡
vue中npm打包遇到× eslint —fix found some errors. Please fix them and try committing again.husky > pre-commit hook failed (add —no-verify to bypass)报错解决方案-卓伊凡
93 7
vue中npm打包遇到× eslint —fix found some errors. Please fix them and try committing again.husky > pre-commit hook failed (add —no-verify to bypass)报错解决方案-卓伊凡
verbose stack FetchError: request to https://registry.npm.taobao.org/md-editor-v3 failed, reason: ce
这篇文章描述了在安装npm包`md-editor-v3`时遇到的淘宝镜像证书过期问题,并提供了解决方案,即通过切换npm镜像源到`https://registry.npmmirror.com/`来解决安装失败的问题。
verbose stack FetchError: request to https://registry.npm.taobao.org/md-editor-v3 failed, reason: ce
8种方法解决vue创建项目报错:command failed: npm install --loglevel error
该文章提供了八种解决Vue项目创建时遇到的`command failed: npm install --loglevel error`错误的方法,包括清理缓存、更换npm源、重新安装Node.js等措施。
8种方法解决vue创建项目报错:command failed: npm install --loglevel error

热门文章

最新文章

推荐镜像

更多