如何解决“npm ERR!network If you are behind a proxy”问题

3

我正在尝试安装npm install --global bower,但是它报错了:

npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/bower failed, reason: connect ETIMEDOUT 13.25.26.4:8080
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 timing npm Completed in 147880ms

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\aksha\AppData\Roaming\npm-cache\_logs\2019-06-27T05_03_12_739Z-debug.log
1个回答

9

我运行了以下命令,并解决了问题:

npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接