1

嘿,我正在安装 angular 并等待 11 个小时,然后互联网速度变慢,我收到了一个错误

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/resolve/-/resolve- 
1.8.1.tgz failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 
registry.npmjs.org: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\lenovo\AppData\Roaming\npm-cache\_logs\2018-07- 
06T21_01_53_610Z-debug.log

我该怎么办?如何成功完成安装?

4

1 回答 1

1

更新节点和 npm

管理员身份运行PowerShell

npm install -g npm-windows-upgrade
npm-windows-upgrade

然后尝试角cli

npm install -g @angular/cli
于 2018-07-07T05:40:54.087 回答