How to Install Node.js on a Mac

Node.js is required for using many JavaScript tools and for creating server-side JavaScript applications. Here is how you install Node.js on a Mac.

The first thing you should do is check to see if you have a version of Node.js already installed. To do that:

  1. Open the Terminal by pressing Command+Space to open Spotlight Search and entering Terminal then pressing Enter.
  2. Enter node - v in the Terminal and press Enter.
    Nats-MacBook-Pro:Webucator natdunn$ node -v
  3. If you do have Node.js installed, it will output the version.
    1. Update to the latest version using npm i -g npm. If you get a bunch of checkPermissions warnings, you should run the command as the superuser like this: sudo npm i -g npm
    2. You now have the latest version installed. You do not need to continue with these instructions.
  4. If you do not have Node.js installed, it will output something like -bash: node: command not found. Continue with these instructions to install it.
  5. Go to You'll see download links for MacOS. Node.js MacOS Download Links If you are using Node.js for a Webucator class, you should select the LTS version. The Current version has the latest features, but may be more prone to changes and bugs than the LTS (Long Term Support) version.
  6. When the file finishes downloading, locate it in Finder and double-click on it.
  7. Go through the entire installation process.
    Installation Process
  8. When installation is complete, open the Terminal by pressing Command+Space to open Spotlight Search and entering Terminal then pressing Enter.
  9. Enter node - v in the Terminal to verify that Node.js is installed correctly and to see the version of Node.js that was installed.
    Nats-MacBook-Pro:Webucator natdunn$ node -v

If a version was output, then you're all set.

Author: Chris Minnick

Chris Minnick, the co-founder of WatzThis?, has overseen the development of hundreds of web and mobile projects for customers from small businesses to some of the world’s largest companies. A prolific writer, Chris has authored and co-authored books and articles on a wide range of Internet-related topics including HTML, CSS, mobile apps, e-commerce, e-business, Web design, XML, and application servers. His published books include Adventures in Coding, JavaScript For Kids For Dummies, Writing Computer Code, Coding with JavaScript For Dummies, Beginning HTML5 and CSS3 For Dummies, Webkit For Dummies, CIW E-Commerce Designer Certification Bible, and XHTML.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.