Installing Node.js and NPM
 public

This guide will walk you through installing Node.js and the Node Package Manager (NPM).

To complete this guide, you’ll need:

  • A mac computer
  • An internet connection
  • About five minutes

You may already have it!

Depending on how your machine was set up, you might already have Node.js installed.

  1. Open the Terminal application. It lives in the Applications > Utilities folder. You can also press Command + Space, type “Terminal”, and select Terminal under Applications.
  1. In the Terminal, type node -v and press Enter.
If you see a version number (as shown above) then congratulations! You already have Node.js installed. Skip to the last section, Update Node.js, to ensure that your version is up to date.

If not, or if you see a response such as  command not found: node then you do not have Node.js installed and you should continue with this article.

Install Node.js

Follow the steps below to install Node.js and its package manager, NPM.

  1. Visit the Node.js website.
  1. On the page that opens, you’ll see two green buttons. Select the button on the left, which should have a title that ends with the letters LTS.
  1. When the download completes, open Finder and navigate to your Downloads folder.
  1. Right click on the package and select Open.
  1. If given a dialog asking if you’re sure you want to open the file, select Open.

  1. Follow the steps in the Install Node.js wizard.
  1. When the installation completes, accept the offer to move the installer to the Trash.

Check if it’s installed correctly

Now that we’ve installed Node.js, let’s check if it works.

  1. Open the Terminal again. (As a reminder: it lives in the Applications > Utilities folder. You can also press Command + Space, type “Terminal”, and select Terminal under Applications.)
  1. Type node -v and press Enter.
If you see a version number (as shown above) then congratulations! You’ve installed Node.js and NPM.

Update Node.js

Should you need a newer version of Node, here’s how: