简体   繁体   中英

Can't install latest angular cli on ubuntu

I'm trying to install angular via ubuntu.

When I type the version commande node -v

I get v12.14.1

Then I try to install npm package sudo npm install -g @angular/cli I get a warning

npm WARN npm npm does not support Node.js v10.15.2

ng version

I get angular-cli: 1.0.0-beta.28.3

The npm version is 6.13.4

The issue here seems to be that sudo node -v gives 10.15.2 where as node -v gives 12.14.1.

This means that there are 2 different node versions installed.

You can get around this by using sudo -E node -v or by deleting the link to the other node.js install by doing: rm /usr/local/bin/node .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM