A package manager for Mac that you could use is Home Brew. In order to Install the Package Manager enter the following command in the terminal
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Home brew/install/master/install)"
brew install node
This Installs Node.js and NPM. In order to ensure that node.js has been Installed, type this command in the terminal
If it returns a version number, it means that node.js has been successfully Installed.
Let’s summarise, there are two steps in Installing Node.js
- Install a Package Manager for Mac. In this case we have Installed HomeBrew.
- Once Installed, Install node by typing the install node command in the terminal.