It’s very easy to install and manage multiple active node.js versions by Node Version Manager(NVM).
Install or update nvm
First you’ll need to make sure your system has a c++ compiler. For OSX, XCode will work. And then install or update nvm by the following command:
|
|
Manage node versions
To download, compile, and install the latest v5.7.x release of node, do this:
|
|
And then in any new shell just use the installed version:
|
|
You can also get the path to the executable to where it was installed:
|
|
You can see what versions are installed:
|
|