Install Node.js

Install Node.js and npm, and confirm your setup works before starting a project.

beginner5 minmacos · windows · linuxUpdated August 2026
#node.js#npm#installation#javascript

Requirements

  • Terminal access

Choose your platform

0/2 steps · 0%
01

Install with Homebrew

bash
$ brew install node

Tip

Prefer version management? Install nvm instead so you can switch Node versions per project.

02

Verify the installation

bash
$ node --version
$ npm --version

Expected output

v22.x.x
10.x.x

Success

Node.js and npm are ready.

Troubleshooting

Node isn't on your PATH — usually because the terminal session started before installation finished.

Close and reopen your terminal, then check again:

bash
$ node --version