Just like any programming language, platform, or library, getting up and running with Node.js takes some initial setup before you can start hacking away. Luckily, it's pretty simple... here, we'll show you how to get Node set up with MacOS.
Just like any programming language, platform, or library, getting up and running with Node.js takes some initial setup before you can start hacking away. With Node.js, the only initial setup required is, quite simply, getting the binary installed.
In this brief tutorial, we'll take a quick look at how to get Node.js on MacOS. Once we've completed the entirety of the tutorial, you'll be ready to take the next step with Node.js.
This guide covers installing Node.js on the following versions of OS X and MacOS: OS X 10.10 (Yosemite), OS X 10.11 (El Capitan), and MacOS 10.11. These are the versions that are consistently tested and supported by the Node.js build process at the time of writing.
Step 0: The Quick Guide (TL;DR) to Get Node.js Installed on MacOS
Here's the abbreviated guide, highlighting the major steps:
- Go to the Node.js Downloads page
- Download Node.js for MacOS by clicking the 'Macintosh Installer' option
- Run the downloaded Node.js
.pkg
Installer - Run the installer, including accepting the license, selecting the destination, and authenticating for the install.
- You're finished! To ensure Node.js has been installed, run
node -v
in your terminal - you should get something likev6.9.4
Step 1: Download the Node.js .pkg
Installer
As our first step, we need to actually get the official installer for Node.js on MacOS. To do so, we can head over to the Node.js Downloads page to download the installer.
You can get the MacOS installer by clicking the Macintosh Installer
option - this will download the .pkg
installer for Node.js. Make sure you save it somewhere that you'll be able to access it!
Step 2: Run the Node.js Installer
Now that you've got the installer downloaded, you'll need to run it. The installer is a pretty typical interface - it won't take long to get through it (under a minute), even though there are a few parts to it. You can get through it by following the guide below:
- Introduction
- Select
Continue
- Select
- License
- Select
Continue
- Select
Agree
- Select
- Installation Type
- Select
Install
- Authenticate with your Mac to allow the Installation
- Select
Install Software
- Select
- Summary
- Select
Close
- Select
Step 3: Verify That Node.js Was Properly Installed
To verify that Node.js was installed correctly on your Mac, you can run the following command in your terminal:
If Node.js was properly installed, you'll see something close to (but probably not exactly) this: