How to install the Node version manager(NVM)?

Learn how to install the Node version manager(NVM) and how it works here in this blog.

In general, NVM helps you to switch between different versions of Node. This blog covers all the relevant details about the Node Version Manager(NVM). So let’s start with the Nodejs first:

Nodejs releases their updates at a regular interval of time. Every new major release of Nodejs comes out every six months. The official Nodejs foundation is very keen on releasing its updated versions.

The latest version of  Nodejs is Node.13.0.1 released in 2019 and still continues.

Build an Ecommerce platform with headless technology with Nodejs!!!

Whenever the Node team releases a new odd version, it’s previous even version will become Long Term Support (LTS). This Long Term Support (LTS) comes with 18 months of active support from the implementation date of LTS. 

After six months, the odd-numbered releases will become unsupported. After then the even-numbered releases move to Active LTS status. And such Active LTS will be ready for general use. LTS release status is “long-term support”, which guarantees to fix bugs for 30 months in total. Production applications should only use Active LTS releases.

To manage different versions of Nodejs, a special tool called Node Version Manager(NVM) is implemented.

Install Node version manager – NVM: Things to learn

Install Node version manager - NVM

Node Version Manager(NVM) is a powerful tool for the programmers to switch between different Node versions. It is an added advantage for one who works in multiple projects of Nodejs that having various versions. It allows you to install each version with a single command. Then, as usual, it allows you to set a default via the command-line interface.

Benefits of NVM install

  • Easy to download and deploy in any Nodejs projects.
  • To manage different Nodejs versions, it is provided with Command-line utility.
  • Developers can access all the long term support (LTS) versions of Nodejs.
  • It handles compilation for most systems with no-prebuilt binaries available.
  • And also it simplifies the installation process.

Read: Nodejs: What’s great about Node Package Manager(NPM)?

How to Install Node version manager – NVM?

By using the following command to install NVM on your system/machine,

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

 OR

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

Some useful commands of Node version manager:

Check NVM version

code source

nvm --version

Check all Nodejs versions installed on your machine

Code source

nvm ls

Install a particular version of Nodejs

code source
nvm install NODE_VERSION_NAME

//Replace NODE_VERSION_NAME to actual nodejs version

Use a particular version of Nodejs

code source
nvm use NODE_VERSION_NAME

//Replace NODE_VERSION_NAME to actual nodejs version

Set default version of Nodejs

code source
nvm alias default NODE_VERSION_NAME

//Replace NODE_VERSION_NAME to actual nodejs version

ALIASES

Node Version Manager(NVM) allows you to use aliases to target versions. You can do this with a specific version number only. These aliases include:

  • node: which installs the latest version of Nodejs
  • unstable: installs the latest unstable version of Nodejs
  • iojs: installs the latest stable version of io.js

Read: Nodejs – OS module

Create new alias of Nodejs

code source
nvm alias ALIAS NAME NODE_VERSION_NAME

//Replace

//Node_Version_Name to actual nodejs version

//ALIAS_NAME to actual alias name
Conclusion

Knowing what is and how to install Node Version Manager(NVM) and how to use it will greatly help you to save more time. Keep this blog for your future reference and if you ever need a refresher.

Still, need clarification about the Nodejs and its developmental process? Contact us without any hesitation.

Comments

7 responses to “How to install the Node version manager(NVM)?”

  1. Patrick Avatar
    Patrick

    It’s really helpful me, im learn about install node js version manager

    Thanks Webnexs Team.

  2. Marvin Avatar
    Marvin

    Very interesting, I was just looking for Node version manager(NVM).

    It is really good guide.

    Thanks Man.

  3. Carol Avatar
    Carol

    informative ! I’ve read it and got clear my doubts about What is Node version manager(NVM) and how to install it.

    Thanks Hari.

  4. David Tew Avatar
    David Tew

    Much recommended resource on installing nodejs and try to write on a few more topics that include the Headless platform.

  5. DevinRuire Avatar
    DevinRuire

    Your pieces of information on how to install nodejs version manager – NVM look promising and need more appreciation, good work. Internet is looking forward to covering more topics related to Nodejs.

  6. Andrew S Avatar
    Andrew S

    Was following all your blog contents, every single one is good, and this one is a great one to read. Let us explore more about Nodejs and headless in upcoming blogs, thanks.

  7. Job venten Avatar
    Job venten

    interesting details and insight! what about the role of Node in headless commerce?

Leave a Reply

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