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:
node -v
This should print the version number so you’ll see something like this:
v0.12.7.
To see if NPM is installed, type the following into the Terminal:
npm -v
This should print the version number, so you’ll see something like this:
2.12.1
Done, Installed and Verified!