Different projects use different Node versions. That means you might have to switch your Node versions depending on the project. As you might image, installing and uninstalling Node version is time-consuming.

Thankfully, we have the Node Version Manager that allows us to switch between different Node versions easily. Thus, in this article, you will learn how to install it and use it on macOS.

The article illustrates you two ways of installing the Node Version Manager. With Homebrew and with the cURL command.

Using the cURL command

One of the simplest ways to install NVM is to run the following cURL command in your terminal:

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

What does the command actually do?

  1. It downloads the nvm script from GitHub and then it runs it.
  2. After that, it also clones the nvm repository to /Users/yourMacUsername/.nvm.
  3. Lastly, it adds a script to your profile file (~/.bash_profile, or ~/.zshrc, or ~/.profile, or ~/.bashrc) to enable you to use the nvm command in your terminal.

#general programming #node #nodejs

How To Use Multiple Node Versions With NVM On MacOS - Node Version Manager
1.50 GEEK