Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4421

Updated node to 16.16.0, says 12.22.9 when I 'nodejs --version'

$
0
0

Sorry Linux n00b here.

I'm trying to update nodejs in a fresh installation of Ubuntu 22.04 in a VM.

When I run this:

nodejs --version

It outputs:

v12.22.9

I've seen in many places that to update node to the latest version you execute these commands:

sudo npm cache clean -fsudo npm install -g nsudo n stable

When I do it it appears to work and states:

copying: node/16.16.0

However, when I nodejs --version again it still says v12.22.9

What am I doing wrong?

All I've found online tells me to do the above.

How can I update nodejs and have it say the latest version?


Viewing all articles
Browse latest Browse all 4421

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>