NVM - Node version manager

NVM - Node version manager

NVM (Node Version Manager by the user creationix on GitHub) is a tool that allows the user to switch between different versions of Node.js, helping reduce overhead when reproducing production bugs in development environments. When developing Node.js applications, you may need to install multiple versions of Node.js in order to handle your day-to-day tasks.

There are two different GitHub repositories for two different platforms setups : ( MacOS/Linux and Windows OS)

macOS/Linux Setup:

To install NVM on the system you may either download and run the script manually or use the following commands :

cURL command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

Wget command

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

With the above command, nvm will download a script and run it on your system. The script clones the nvm repository from GitHub to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

This will complete your NVM installation on the system now you are good to go to install and use multiple Node.js versions on your system.

if necessary follow the instructions from the NVM official GitHub channel.

Windows OS:

To install NVM on the system simply download the NVM window installer, then double-click on the windows setup wizard, you need to follow simple steps on the installer.

NVM WIndow installer

Now you are ready to use NVM with different Node.js Versions.

Installation and Use of NVM with respect to Node.js:

  • Check NVM version
C:\>nvm version


  • Installation of Node
//nvm install the latest available version of Node.

c:\>nvm install node 

//nvm install the latest LTS release

c:\>nvm install --lts 


//Install a specific version. Ex:- nvm install v11.14.0

c:\>nvm install <version number> 

  • View locally installed versions List.
c:\>nvm ls

  • Switch to node version
//Switch to latest installed version.

c:\>nvm use node

//Switch to a specific version of Node. Ex: nvm use v11.14.0

c:\>nvm use <version number>


Happy coding....... :)


To view or add a comment, sign in

More articles by OMKESH B. KENDRE 👋

  • Clipboard API in JavaScript

    The Clipboard API in JavaScript provides a convenient way to copy content to the user's clipboard, enabling seamless…

  • Unlocking Seamless Asynchronous Loading with React Suspense

    As web applications become more dynamic, the need for efficient data fetching and seamless user experiences has never…

  • Javascript Design Patterns

    JavaScript is a versatile and powerful programming language commonly used for web development. As applications become…

  • JavaScript Design Pattern

    History of Design Pattern Programming patterns have been around ever since they were created. But they were not…

  • Polyfills for forEach()

    What is Polyfill? Polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect…

  • Polyfills for filter()

    What is Polyfill? Polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect…

  • Polyfills for map()

    What is Polyfill? Polyfill is a piece of code (or plugin) that provides the technology that you, the developer, expect…

  • Storybook

    Storybook is an open-source UI expert tool to build UI components and pages. It is easy to test UI components during…

  • Web Content Accessibility

    What is Web Accessibility? The web and internet is a most important part of our life which includes government…

    1 Comment

Explore content categories