Angular CLI安装期间发生错误

时间:2017-09-18 13:53:27

标签: angular io angular-cli

我整天尝试使用不同的解决方案。但仍然会发生同样的错误。我的npm version is 5.3.0node version is 8.5.0。 当我输入

npm install -g @angular/cli 

然后输入,会发生这些错误。我已经尝试过来自node.js的推荐版本(可能比这个版本旧版本)但是它也会出现差异错误,这可能比这更糟糕。我认为这个node.js版本是最新版本。我按照Angular io quickstack的方式进行,但它无法帮助我解决这个问题。我该如何解决这个问题?

C:\Users\Lenovo>npm -v
5.3.0

C:\Users\Lenovo>node -v
v8.5.0

C:\Users\Lenovo>npm install -g @angular/cli

npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! enoent request to https://registry.npmjs.org/@angular%2fcli failed, reason: getaddrinfo ENOENT registry.npmjs.org:443
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR!可以在以下位置找到此运行的完整日志:

npm ERR!     C:\Users\Lenovo\AppData\Roaming\npm-cache\_logs\2017-09-18T13_28_55_949Z-debug.log

1 个答案:

答案 0 :(得分:0)

确保您没有运行代理或VPN。然后尝试卸载首先清除缓存npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest

相关问题