无法以root用户身份安装angular CLI
我刚刚尝试使用命令无法以root用户身份安装angular CLI,angular,angular-cli,Angular,Angular Cli,我刚刚尝试使用命令npm install-g--unsafe perm@angular/CLI以root用户身份安装angluar CLI,我遇到了以下问题: root@ubuntu-:~/test# npm install -g --unasafe-perm @angular/cli npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated request@2
npm install-g--unsafe perm@angular/CLI
以root用户身份安装angluar CLI,我遇到了以下问题:
root@ubuntu-:~/test# npm install -g --unasafe-perm @angular/cli
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 127
npm ERR! path /root/.nvm/versions/node/v15.14.0/lib/node_modules/@angular/cli
npm ERR! command failed
npm ERR! command sh -c node ./bin/postinstall/script.js
npm ERR! sh: 1: node: Permission denied
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-04-30T09_59_17_614Z-debug.log
为什么不能将angular cli安装为root用户
我正在使用最新的ubuntu 20.04 同样的问题也在这里得到了答案,因为我已经以root用户身份登录,所以帖子不是真的。。。