After a couple of seconds, power on your Mac, and if destiny favors you, the Mac will successfully upgrade to the latest macOS Catalina. Go to Apple’s Support Website In the last resort, you can check the update on the Apple Support page, from where you can download and install macOS Catalina on your Mac. Step 2 – Install NVM on macOS. Now, you system is ready for the installation. Update the Homebrew package list and install NVM. Brew update brew install nvm. Next, create a directory for NVM in home. Now, configure the required environment variables. Edit the following configuration file in your home directory. Open a Mac app from an unidentified developer. If you try to open an app that isn’t registered with Apple by an identified developer, you get a warning dialog. This doesn’t necessarily mean that something’s wrong with the app. For example, some apps were written before developer ID registration began. If the above command returns nothing, then Xdebug is not available on your install. Go back the steps to find out what's missing. References and thanks: Can't compile a C program on a Mac after upgrading to Catalina 10.15; Missing system headers (/usr/include) on macOS Catalina; Installation of Xdebug on MacOS Catalina 10.15; PHP 7.3.8. How to Install Git on a Mac. Apple's model of Git comes preinstalled on macOS. Open up your Terminal or shell script editor of choice and enter git -version to verify which version of Git is on your machine. If not already on your machine, running git -version will prompt you to install Git.

The NVM (Node Version Manager) is a shell script used for installing and managing Node.js on a Linux based system. The macOS users can install NVM using the homebrew.

This tutorial help you to install NVM on your macOS system and manage Node.js versions.

Prerequisites

You must have macOS desktop access with administrator privileges.

Login to the macOS desktop system and install Homebrew on your system (if not already installed)

For more instruction visit Homebrew installation tutorial.

Step 1 – Remove existing Node Versions

If your system already have node installed, uninstall it first. My system already have installed node via Homebrew. So uninstalling it first. Skip if not already installed.

Step 2 – Install NVM on macOS

Now, you system is ready for the installation. Update the Homebrew package list and install NVM.

Next, create a directory for NVM in home.

Now, configure the required environment variables. Edit the following configuration file in your home directory

and, add below lines to ~/.bash_profile ( or ~/.zshrc for macOS Catalina or later)

Press ESC + :wq to save and close your file.

Install Git On Mac Catalina

Next, load the variable to the current shell environment. From the next login, it will automatically loaded.

That’s it. The NVM has been installed on your macOS system. Go to next step to install Node.js versions with the help of nvm.

Install Git On Catalina

Step 3 – Install Node.js with NVM

First of all, see what Node versions are available to install. To see available versions, type:

Now, you can install any version listed in above output. You can also use aliases names like node for latest version, lts for latest LTS version, etc.

How Do I Install Git On Mac

After installing you can verify what is installed with:

If you have installed multiple versions on your system, you can set any version as the default version any time. To set the node 14.X as default version, simply use:

Similarly, you can install other versions like Node 12.X or Node 15 and switch between them.

Conclusion

This tutorial explained you to how to install NVM and node.js on macOS system.