Skip to main content

Installing Node.js & npm

Node.js is a program that runs JavaScript code on your computer (outside of a web browser). npm (Node Package Manager) comes bundled with Node.js and is used to install third-party libraries and tools — think of it as an app store for code packages.

Your application will be built with JavaScript, so Node.js is essential.

Installation

The recommended way to install Node.js on Mac is via the official installer:

  1. Go to nodejs.org
  2. Download the LTS (Long Term Support) version — this is the stable, recommended one
  3. Open the downloaded .pkg file
  4. Follow the installer steps, using all the defaults
  5. Click Install, enter your password if prompted, then click Close

Verify the installation

Open a new terminal window (this is important — existing terminals won't see the new installation) and run:

node -v

You should see a version number like:

v22.14.0

Now check npm:

npm -v

You should see something like:

10.9.2
If the commands aren't found

If you get "command not found", try closing all terminal windows and opening a fresh one. The installer updates your system PATH, but only new terminal sessions pick up the change.

What is npm used for?

When we build your site, we'll use npm install to download libraries that handle things like running a web server and building the user interface. Instead of writing everything from scratch, we use packages that other developers have already built and shared.

What's next?

Node.js and npm are ready. Next, we'll set up your Claude account so you can use AI to help write code.