Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法以root用户身份安装angular CLI_Angular_Angular Cli - Fatal编程技术网

无法以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用户身份登录,所以帖子不是真的。。。