前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >npm install报错ERR! code ETIMEDOUT的解决办法

npm install报错ERR! code ETIMEDOUT的解决办法

作者头像
德顺
发布2020-06-03 15:38:28
32.5K1
发布2020-06-03 15:38:28
举报
文章被收录于专栏:前端资源前端资源

今天重装系统,使用 npm install 安装组件报错:

代码语言:javascript
复制
D:\vue>w3h5>npm i cnpm -g
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/graceful-readlink failed, reason: connect ETIMEDOUT 104.16.25.35:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Deshun\AppData\Roaming\npm-cache\_logs\2020-06-01T03_09_36_539Z-debug.log

在网上查了一下,找到解决方法:

执行下面两行代码,清除代理和缓存,问题解决。

代码语言:javascript
复制
npm config set proxy false
npm cache clean
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档