Installing Node.js on Mac with Homebrew
This will be short and sweet because the real work already went into installing Homebrew onto the mac. Documented here in my previous post: Installing Homebrew on Mac
The entire reason for installing Homebrew is for making installations like these as painless as possible. Homebrew handles downloading, unpacking and installing Node and NPM on your system.
Let’s get started by opening our terminal.
Type the following brew command:
brew install node
Just wait, and you will see that the “Caveats” are being installed and extracting ‘node’ onto a folder they interestingly named “Cellar” /usr/local/Cellar/node/latest_version-number.
Just to verify, as we did with installing Homebrew, let’s run a couple of simple commands to see the versions of Node and NPM installed:
To see if Node is installed, type the following into the Terminal:
This should print the version number so you’ll see something like this:
To see if NPM is installed, type the following into the Terminal:
This should print the version number, so you’ll see something like this:
Done, Installed and Verified!