Installing multiple versions of Node.js

If you have the need for using or testing multiple different versions of Node.js, theres a small tool that can help you a lot.

It's an npm package called n.

You install it via npm:

npm install -g n

And then you can easily install a certain version of Node.js like this:

n 5.12.0 - to install node.js version 5.12.0

You can also type n and press enter, to list all installed Node.js versions, and select which you want to use:

Use the up and down arrows, and enter, to select which version to use.

Installing the latest version

To install the latest version of node, just type: n latest

Removing a Node.js version

To remove a Node.js version, just type: n rm 5.12.0

comments powered by Disqus