我无法从 npm 安装 Angular cli,并且它在要求 loadAllDepsIntoIdealTree 时卡住了。
采取的步骤:
C:\Windows\system32\node -v
v6.11.1
C:\Windows\system32\npm -v
2010年10月3日
C:\Windows\system32\npm install -g @angular/cli
它被附加的错误卡住了
最佳答案
我也遇到了同样的问题。以下解决方案对我有用。
如果你升级你的node
会更好和npm
版本到最新。之后请按照以下步骤安装angular/cli
:
使用管理权限打开命令提示符并卸载 angular/cli
通过使用npm uninstall -g angular-cli
命令。
删除node_modules
目录,然后使用 npm cache clear --force
清除缓存命令。
删除C:\Users\<username>\AppData\Roaming\npm\
和C:\Users\<username>\AppData\Roaming\npm-cache
.
尝试安装angular/cli@latest
通过使用npm install -g @angular/cli@latest
命令。
希望以上技巧能解决您的问题。
关于node.js - npm install -g @angular/cli 在 Windows 7 中不起作用并挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45325567/