How to install and update NVM node version manager on Ubuntu

New to node and need to install npm, node.js? Use NVM node version manager so you can install more than one version of nodejs.

I had to look for the answer to this until I found it. You update to a newer version of NVM node version manager the same way you install it regardless of how you install it.  I am not sure what happens if you install nvm with curl then try to update it in another way.

For example I used the following in my terminal as not the root user, just a plain user
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

When I want to install the next version  I replace the v0.35.3 with the next version and it does all the work.  If you installed nvm as a root user then you will not be able to access it easily as any other user.

In fact, if you type nvm –version in the command line as a regular user after you installed it as a root user, you will be told it is not installed, or nvm is not a recognized command would you like to install.   I did this, so that is how I learned not to install it as a root user.

If you are using windows you can install nvm by following these instructions

More info and resources about nvm here.

More info and resources about node package manager

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: