node.js - How to properly upgrade node using nvm - Stack Overflow

Ask questions Research chat →

https://stackoverflow.com/questions/34810526/how-to-properly-upgrade-node-using-nvm · scraped

javascript

Attachments

Scraped Content

— 137 words · 2026-02-14 03:12:33 UTC ·

Excerpt

Here are the steps that worked for me for Ubuntu OS and using nvm Go to nodejs website and get the last LTS version (for example the version will be: x.y.z) nvm install x.y.z # In my case current version is: 14.15.4 (and had 14.15.3) After that, execute nvm list and you will get list of node versions installed by nvm. Now you need to switch to the default last installed one by executing: nvm alias default x.y.z List again or run nvm --version to check: Update: sometimes even if i go over the steps above it doesn't work, so what i did was removing the symbolic links in /usr/local/bin cd /usr/local/bin sudo rm node npm npx And relink: sudo ln -s $(which node) /usr/local/bin/nodesudo && ln -s $(which npm) /usr/local/bin/npmsudo && ln -s $(which npx) /usr/local/bin/npx
Here are the steps that worked for me for Ubuntu OS and using nvm Go to nodejs website and get the last LTS version (for example the version will be: x.y.z) nvm install x.y.z # In my case current version is: 14.15.4 (and had 14.15.3) After that, execute nvm list and you will get list of node versions installed by nvm. Now you need to switch to the default last installed one by executing: nvm alias default x.y.z List again or run nvm --version to check: Update: sometimes even if i go over the steps above it doesn't work, so what i did was removing the symbolic links in /usr/local/bin cd /usr/local/bin sudo rm node npm npx And relink: sudo ln -s $(which node) /usr/local/bin/nodesudo && ln -s $(which npm) /usr/local/bin/npmsudo && ln -s $(which npx) /usr/local/bin/npx

Visibility

Visible to everyone

Reading Status

Related Bookmarks

My Note


Saved!

Annotations

Export as Markdown
+ Annotate selection

Add Annotation