Managing Node.js Versions with NVM(Node Version Manager)

Managing Node.js Versions with NVM is pretty easy and simple.Node Version Manager (NVM) is a clean and neat little bash script which allows you to manage multiple versions of Node.js on the same box.  If you are working with different node.js applications you might switch to the different version of node quiclkly to test the application.A version manager really helps to test our applications under different versions of the related software.That’s where you can use nvm to download, install, and use different versions of Node.js:

Installation of Node Version Manager:

The steps are pretty simple and easy to install NVM. You do have to have at least one version of node and npm to get started, but after that, you can install nvm with .npm

Once you do the installation using above command the next step is to Setup the NVM. Follow the below steps to setup Node version manager.

Setup NVM Path

Note, this is a good thing to do anyway – it will allow you to run things like jshint on a per-repo basis without having to install it globally and without having to prefix the path.

Once you have configured NVM on your machine it’s now easy to install any version of node.js into your machine and switch to different version whenever needed.

To install Node.JS version using NVM

Switch to another version of Node.JS using NVM

To check all the versions of node installed in your machine simply run the below ls command in nvm window.

List all version of Node.JS Installed

To Uninstall, a specific version of node run the below command

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *