Kenzie Systems Logo

Install Node.js macOS

Build production-ready projects, then publish them safely.

Why Node.js is important

Node.js is the standard toolchain for modern web apps (React, Vite, Ant Design, Next.js). On macOS, it lets you install dependencies, compile code into an optimized production build, and publish only the final output folder.

Production mindset
Recommended
  1. Develop locally.
  2. Build when ready: npm run build.
  3. Publish only dist/ (Vite) or build/ (CRA).
  4. Serve via IIS (static), Nginx/Apache (static), or run Node only when needed (SSR/API).
Important: For many frontend projects, Node is mainly a build tool. Your production server can host the compiled output without running Node.

Before you start

macOS machines can be Apple Silicon (M1/M2/M3) or Intel. Both are supported. To check your CPU type:

Check architecture
Quick
uname -m

arm64 = Apple Silicon (M-series), x86_64 = Intel.

Install Node.js on macOS

There are two recommended methods. Use Homebrew for easy upgrades, or use the official installer for a simple, guided setup.

Option A: Homebrew (recommended for developers)
Preferred

If Homebrew is not installed, install it from the official website, then run:

brew update brew install node
Why this is great: Easy upgrades later with brew upgrade node.

If you see “command not found: brew”, install Homebrew first (link on the right column).

Option B: Official Node.js installer (simple)
Official
  1. Download Node.js from the official website (LTS recommended).
  2. Select the macOS installer for your chip (Apple Silicon or Intel).
  3. Run the installer and keep defaults.
  4. Close and reopen Terminal after installation.
Tip: If you used Homebrew before, avoid mixing installs (Homebrew + MSI/PKG) for Node. Choose one method to keep PATH clean.

Double-check everything installed properly

1) Confirm versions
Required

Open Terminal and run:

node -v npm -v

You should see version numbers (example: v20.x.x). That confirms Node.js and npm are installed.

2) Confirm PATH / location
Recommended

This confirms macOS is using the correct binaries:

which node which npm

Homebrew usually points to:
• Apple Silicon: /opt/homebrew/bin/node
• Intel: /usr/local/bin/node

3) Real test: npm can create a project
Recommended
mkdir node-test cd node-test npm init -y

If package.json is created, npm works correctly.

4) Real test: production build
Production

Inside your web project folder:

npm install npm run build

Most modern projects generate:
• Vite: dist/
• CRA: build/

Publish: Copy only dist/ or build/ to your server / IIS site folder. Keep your dev sources private.

Recommended downloads

Use trusted sources only.

Official Node.js downloads
Trusted

Choose LTS for stability and long-term production compatibility.

Homebrew (package manager)
Recommended

After installing Homebrew, you can install Node with:
brew install node

Troubleshooting

Common fixes if Terminal cannot find node/npm or builds fail.

Command not found: node
Fix
  • Close and reopen Terminal (PATH refresh).
  • Run which node again.
  • If you installed via Homebrew, verify brew works: brew -v.
Brew health check
Optional
brew doctor brew update brew upgrade node

This helps when Node exists but the environment is outdated or misconfigured.

Native modules / build tools
Fix

Some npm packages compile native code. If you get build errors, install Xcode Command Line Tools:

xcode-select --install

After installing, try again: npm install.

Always download from official sources. Avoid unknown installers or third-party “bundles”.