无法使用node.js命令提示符安装Angular CLI

时间:2018-07-12 07:30:56

标签: node.js npm angular-cli npm-install angular-cli-v6

我无法在Windows上安装Angular CLI。

我尝试了以下方法:

C:\Users\username>node -v
v8.11.3 
C:\Users\username> npm -v
5.6.0 

C:\Users\username>npm install -g @angular/cli
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@angularMfcli failed, reason: connect ETIMEDOUT 104.18.94.96: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' 

请告诉我为什么它不起作用以及我应该怎么做。

1 个答案:

答案 0 :(得分:0)

此错误表示您的互联网连接不正常。

我建议您检查互联网连接,然后重试。