How to install, upgrade or switch NodeJS to any version

When you work in a few NodeJS projects, you may need an easy and fast way to install, upgrade or switch NodeJS to any version. With NVM is possible.

Install

curl https://raw.github.com/creationix/nvm/master/install.sh | sh

Usage

Install a NodeJS version

nvm install 0.10.26

Switch NodeJS to any version

nvm use 0.10.26

Use by default

nvm alias default 0.10.26

List the versions installed

nvm ls

By the way, if you get nvm: command not foundcheck this solution

More info about NVM

David Burgos

Read more posts by this author.