当我尝试使用 npm 安装 Angular-cli 时,出现错误,代码为 ETIMEDOUT
我尝试删除代理(代理和 HTTP 代理),尝试在管理模式下运行 cmd,更改 Nodejs 目标的路径
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 104.16.22.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\123\AppData\Roaming\npm-cache\_logs\2019-02-04T09_5I_06_689Z-debug.log
我尝试过什么并不重要,但每次都会出现相同的错误。需要帮助大家
在大多数情况下,您位于代理服务器后面或网络设置不良。
首先,运行 npm config list 并检查您是否位于代理后面。如果是这样,请尝试运行
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)