1
我跟着这个post卸载旧的安装有下列步骤操作:NPM无法安装角CLI,或看起来像这样
[sudo] npm uninstall -g @angular/cli
[sudo] npm cache verify
[sudo] npm install -g @angular/cli
的最后一步给了我麻烦 - 控制台屏幕只保留此消息滚动,直到我不得不按Ctrl + C它。
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.1.4' ]
gyp verb install input version string "8.1.4"
gyp verb install installing version: 8.1.4
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.1.4
gyp verb ensuring nodedir is created /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.1.4
我试着用谷歌搜索它,它似乎是一个NPM版本问题,但没有更多有用的信息。
我用ubuntu 16.04虚拟机,内存就足够了。我明确运行了npm i -g node-gyp,并通过了。然后,我再次尝试“npm install -g @ angular/cli”,这一次看起来很顺利。谢谢! –