无法安装包含NPM的软件包...卡在[email protected]
问题描述:
我正在尝试使用npm安装@angular/cli
。但它总是卡住在下载包chokidar
:无法安装包含NPM的软件包...卡在[email protected]
诊断信息:
npm version 5.0.0
node version 8.0.0
Operating System Windows 7
答
我自己解决这个问题。我在导致问题的环境变量(系统)中有多个临时变量。
答
请升级您的node
和npm
版本最新。之后,请按照以下步骤安装angular/cli
:
1)使用管理权限打开您的命令提示符并使用npm uninstall -g angular-cli
命令卸载angular/cli
。
2)您可以尝试从您的项目目录中删除node_modules
,然后使用npm cache clear --force
命令清除缓存。 3)删除C:\Users\<username>\AppData\Roaming\npm\
和C:\Users\<username>\AppData\Roaming\npm-cache
。
4)尝试使用npm install -g @angular/[email protected]
命令安装angular/[email protected]
。
你等了多久才能完成。有时它只是需要更多的时间 –
尝试做npm缓存清理 –
我等了10个多小时。我清理了我的系统并重新安装了节点,但结果相同。 – user3146692