Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.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
Node.js Can';t更新节点或NodeJ以使用angular;node-v和sudo node-v显示不同的版本_Node.js_Angular_Ubuntu_Angular Cli - Fatal编程技术网

Node.js Can';t更新节点或NodeJ以使用angular;node-v和sudo node-v显示不同的版本

Node.js Can';t更新节点或NodeJ以使用angular;node-v和sudo node-v显示不同的版本,node.js,angular,ubuntu,angular-cli,Node.js,Angular,Ubuntu,Angular Cli,这就是我在ubuntu中所做的: ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ node -v v14.11.0 ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ sudo ng build --verbose Node.js version v8.10.0 detected. The Angular CLI requires a minimum Node.js version of either

这就是我在ubuntu中所做的:

ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ node -v
v14.11.0
ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ sudo ng build --verbose
Node.js version v8.10.0 detected.
The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
我曾尝试使用NVM更新node和NodeJ,但这两种方法都不会更新NodeJ,并且会为
sudo node-v
显示一个完全不同的版本(我需要
运行sudo ng build
,以便它实际修改dist文件夹)

我也不能运行
sudo nvm

ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ sudo nvm
sudo: nvm: command not found
ubuntu@ip-172-31-28-25:/var/www/Author-of-Babel$ sudo nvm
sudo: nvm: command not found