我按照这个post按照以下步骤卸载旧安装:
[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版本问题,但没有更多有用的信息。
答案 0 :(得分:0)
失败的组件似乎是node-sass
依赖项。
由于以下几个问题,可能会发生此问题:
/usr/local/lib/node_modules/
是否存在且可写?您是否能够安装其他全球NPM包?node-gyp
包npm i -g node-gyp
。有时,这有助于需要构建类似node-sass的软件包。同样,如果你没有它,你可能需要git