Step - 1:
1st of all you need to download the latest version of Nodejs from the official Nodejs website
Step - 2:
Go to the correct path using command line or GUI.
Using Command line
cd Downloads/node-v17.0.1-linux-x64.tar.xz/
tar -xf node-v17.0.1-linux-x64.tar.xz
Check Current Node version
node --version
v14.17.0
To upgrade
sudo n latest
Check Updated Node version
node --version
v17.0.1
If you are using graphical interface then go to the destination path. Click right button and select extract here. Open the bin folder.
right click and select open in terminal
To upgrade
sudo n latest
Check Updated Node version
node --version
v17.0.1
Thanks, if you like this article useful then smash the like button. Share it with your friends. Stay Tuned.
Top comments (8)
install nodejs whatever version it is
then type
sudo npm i -g n
sudo n stable
Now you good to go
Saved me a lot of time. thank you
phoenixnap.com/kb/update-node-js-v...
Hey guys, I followed these steps and ran these commands in my terminal but after restarting my terminal it still says nodejs --version is 10.19.0 and node --version is 15.13.0 which is odd because if I open my powershell command line my current version of nod is 16.13.2 which is what I want. Any ideas of what's going on?
my nodejs version is also 10.19.0. and node version is 16.13.0.
Don't worry, you are not going to face any error because your node version is > 12
for installing the latest version open terminal and type
sudo n latest
this is the easy way for download the latest version. On the otherhand there are some issue with the latest version. if you are learning react or other framwork you can face some error for this latest version.
so, your node version is ok. feel free to use it.
thanks bro
🤩🤩 thanks for sharing
Welcome brother