Install Node & npm

1. Install Node.js (you get npm for free)

Remember: npm ships inside Node.js, so you only install one thing. Go to nodejs.org and download the LTS version — "Long-Term Support", the stable build recommended for most people. Pick your operating system:

  • Windows / Mac — download the installer from nodejs.org and click through it (the defaults are fine).
  • Mac with Homebrewbrew install node also works.
  • Linux — use your package manager or, better, a version manager like nvm (see the tip below).

2. Check it worked

Open a terminal and ask each tool for its version number:

Verify the install

Terminal
$ node -v
$ npm -v
In VS Code
  1. Open VS Code
  2. Press Ctrl+` (the backtick key, above Tab) to open the built-in terminal
  3. Type each command and press Enter

You should see version numbers like 'v22.12.0' and '10.9.0'. If you do, both Node and npm are installed.

3. Match the version a project needs

Projects can require a minimum Node version. This website's package.json declares:

"engines": {
  "node": ">=22.12.0"
}

That line means "you need Node 22.12.0 or newer to work on this project". If your node -v is older, install a newer Node. npm will warn you when your version doesn't satisfy engines, which is a common first stumbling block.

Tip — switch versions easily: different projects sometimes need different Node versions. A version manager (nvm on Mac/Linux, nvm-windows on Windows) lets you install several and switch with one command — far less painful than reinstalling Node.

4. Install VS Code & find the terminal

VS Code is a free, popular code editor with everything you need built in. The key thing for npm is its integrated terminal — a command line that lives right inside the editor, so you don't switch windows. Open it with Ctrl+` (or menu Terminal → New Terminal).

5. Always run npm in the project folder

npm commands act on the folder you're currently in — specifically, the folder that contains package.json. This is the single most common beginner mix-up: running a command in the wrong directory. When you open a project folder in VS Code, its built-in terminal automatically starts in the right place.

Confirm you're in the right folder

Terminal
$ ls       # Mac/Linux: list files
$ dir      # Windows: list files
In VS Code
  1. In VS Code, use File → Open Folder… and choose your project
  2. Open the terminal (Ctrl+`) — it opens in that folder
  3. You should see package.json in the file list

If you see package.json listed, you're in the right place to run npm commands.

That's the entire setup. From here on, the chapters are about using npm.

Up next: open up package.json — the file that defines your whole project — and understand every field in it.

FAQ

Frequently Asked Questions

How do I check whether npm is installed?
Open a terminal and run npm -v (and node -v). If you see version numbers, both are installed. If not, download Node.js from nodejs.org — npm comes with it.
Do I install npm separately from Node?
No. npm ships inside the Node.js installer, so installing Node from nodejs.org gives you both node and npm at once.
Which version of Node should I install?
Pick the LTS (Long-Term Support) build for everyday work. This project's package.json sets "engines": { "node": ">=22.12.0" }, so use Node 22.12 or newer for it.
Where do I run npm commands?
In your project root — the folder that contains package.json. In VS Code, open the built-in terminal (Ctrl + backtick) and it already starts in that folder.