Node.js is very active in the development and you may receive news about the new release almost every month. There are times when we actually need to maintain multiple versions of Node with the flexibility to switch between versions without going through the hassle of installation.
Enter Node helper or n.
You need to have at least a node package manager or npm installed in your system.
Here is what you need to do step by step:
Step 1: Clean npm cache
Step 2: Install node helper (n) globally using the following command.
Once node helper is installed. You can either get the latest stable version using
Or if you want a specific version like I needed 8.0.0 then you can do this using.
After upgrade you can check the latest version of node using
If you want to switch to the different version of Node, just type n in the terminal and you should see the Node versions listed. Use arrow keys to choose the version and press enter.
I use this package in production servers too. Works great. Let me know if you use this package too.