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
Advertisement
Answer
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
.