Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How to Install Node.js

Updated November 30, 2026 · Written and reviewed under our editorial policy

To install Node.js, download the LTS installer for your system from nodejs.org and run it, or install a version manager (nvm on Mac and Linux, nvm-windows on Windows) and run nvm install --lts. npm comes with Node. Open a new terminal and run node -v and npm -v to confirm both are installed.

To install Node.js and npm:

  • Go to nodejs.org/en/download and pick the LTS version.
  • Run the installer (Windows .msi, macOS .pkg), or install nvm and run nvm install --lts.
  • Open a new terminal window.
  • Run node -v and npm -v.

Source: nodejs.org download page and npm Docs, "Downloading and installing Node.js and npm", checked 2026-11-28.

Node installed? Install Playwright and run your first cross-browser test on TestMu AI. Here's how to install Playwright, and then run your Node test suite on cloud browsers.

LTS or Current?

nodejs.org offers the LTS (Long-Term Support) release first. LTS lines get bug and security fixes for longer, so pick LTS for almost everything, including work projects and anything you'll run in production. Since Node 27, each new major starts as an Alpha for about six months, becomes Current, with the newest features, for about six months, and then moves to LTS. As of late November 2026, the newest release is v26 LTS (v26.13.1 on nodejs.org on 2026-11-28) and v27 is still an alpha.

Already have Node? Update Node.js to the latest LTS instead of reinstalling.

Install Node.js on Windows

The simplest way to install Node.js on Windows is the .msi installer from nodejs.org, which nodejs.org recommends for system-wide installs. You have three options:

  • Installer: download the LTS Windows Installer (.msi), run it, accept the license and keep the default features, which add Node to your PATH.
  • winget: run winget install --id OpenJS.NodeJS.LTS -e --source winget in a terminal.
  • nvm-windows: download nvm-setup.exe from the coreybutler/nvm-windows releases on GitHub and run it. In a new terminal, run nvm install lts (no dashes in nvm-windows), then nvm use with the version number it installed.
nodejs.org Download Node.js pageNode.js Windows installer

Install Node.js on Mac

On a Mac, you can install Node.js with the nodejs.org installer, nvm or Homebrew:

  • Installer: download the macOS Installer (.pkg) for the LTS version and run it. It puts node and npm in /usr/local/bin.
  • nvm: install nvm with the install command in the nvm README on GitHub (copy it from there, since it names the current nvm release), open a new terminal, then run nvm install --lts. The npm documentation recommends a version manager because it avoids permission errors when you install packages globally.
  • Homebrew: run brew install node. This installs the newest stable Node release, which can be a Current line rather than LTS; Homebrew's versioned formulas, such as node@<major>, install a specific line. Versioned formulas are keg-only, so run brew link --overwrite node@<major> or add its bin folder to your PATH. If you don't have it yet, install Homebrew first.

Install Node.js on Linux

On Linux, nvm is the most dependable way to install Node.js, because distribution packages are often several versions behind the LTS. Install nvm with the command from its README, open a new terminal, then run nvm install --lts. If you prefer system packages:

  • Debian and Ubuntu: sudo apt install nodejs npm installs the version your distribution ships.
  • Fedora: sudo dnf install nodejs.
  • NodeSource: publishes current Node.js packages for Debian, Ubuntu and RPM-based distributions. Follow the setup steps in its nodesource/distributions repository on GitHub.

Run node -v afterwards. If the version is older than your project needs, switch to nvm.

Check the install

To check that Node.js and npm are installed, open a new terminal window (one opened before the install won't see the updated PATH) and run:

node -v
npm -v

Each command prints a version number, such as v26.13.1 for Node. For a quick test that Node runs code, try node -e "console.log('Node works')". npx comes with npm, and npx -v confirms it. With both working, you're ready to write tests; start with our guide to Node.js unit testing.

Command Prompt showing node -v and npm -v output

Install a specific version

To install a specific Node.js version, use nvm and name the version:

nvm install 26.13.1
nvm use 26.13.1
nvm alias default 26.13.1

nvm install 26 installs the newest release in that line, and nvm ls-remote lists every version you can install. With nvm-windows, use nvm install 26.13.1 and nvm use 26.13.1. Without a version manager, download the installer for the version you need from the Previous Releases page on nodejs.org. When a newer LTS comes out, you can update Node.js the same way.

Fix "node is not recognized"

"'node' is not recognized as an internal or external command" means Windows can't find Node.js on your PATH. On Mac and Linux, the same problem shows up as command not found: node. Try these in order:

  • Close every terminal and open a new one. In VS Code, restart the whole app, not only the terminal pane.
  • On Windows, search for Edit the system environment variables, click Environment Variables and check that C:\Program Files\nodejs\ is in Path. If it isn't, run the installer again and choose Repair.
  • With nvm on Mac or Linux, check that the lines the nvm installer added to ~/.zshrc or ~/.bashrc are there, open a new terminal and run nvm use --lts.

Uninstall Node.js

How you uninstall Node.js depends on how you installed it:

  • Windows installer: open Settings > Apps, find Node.js and click Uninstall.
  • nvm or nvm-windows: run nvm uninstall <version> for each version you want to remove.
  • Homebrew: run brew uninstall node.
  • macOS .pkg: there's no uninstaller. Delete /usr/local/bin/node, the npm and npx links next to it, and /usr/local/lib/node_modules. Check each path first, because Homebrew on Intel Macs also uses /usr/local.
  • Linux packages: run sudo apt remove nodejs or sudo dnf remove nodejs.

Frequently Asked Questions

Does installing Node install npm?

Yes. The nodejs.org installers, nvm and Homebrew all install npm, and npx with it, along with Node. Run npm -v to confirm.

Should I install Node with nvm?

Usually, yes. The npm documentation recommends a version manager such as nvm, because it avoids permission errors with global packages and lets you switch Node versions per project.

Which Node version should I install?

Install the LTS version unless a project asks for another one. LTS gets bug and security fixes for longer, and it's the version nodejs.org offers first.

How do I check if Node is installed?

Open a new terminal and run node -v. If it prints a version number, Node is installed; npm -v does the same check for npm.

How do I uninstall Node.js?

Use the tool you installed it with: Settings > Apps on Windows, nvm uninstall <version> for nvm, or brew uninstall node for Homebrew. The macOS .pkg has no uninstaller, so you delete its files from /usr/local by hand.

Related Questions

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests