角度安装失败

时间:2018-04-05 18:06:26

标签: angular npm-install git-bash

当我尝试使用bash终端安装Angular时($ npm install -g @ angular / cli)我面临以下错误消息。我尝试了一切,但仍然无法摆脱这个错误。请帮忙。

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npmjs.org/remove-trailing-separator failed, reason: read ECONNRESET
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'

2 个答案:

答案 0 :(得分:2)

检查您是否有有效的互联网连接。 如果您有,可能是您的npm安装的代理设置有问题。

尝试使用以下代码重置代理设置:

npm config get proxy
npm config rm proxy
npm config rm https-proxy

答案 1 :(得分:-1)

当互联网出现波动时会出现此问题...因此,当出现此问题时,请务必检查互联网。