Node.js Can';t更新节点或NodeJ以使用angular;node-v和sudo node-v显示不同的版本
这就是我在ubuntu中所做的: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@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