Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Updated November 30, 2026 · Written and reviewed under our editorial policy
The cleanest way to update Node.js is with a version manager: run nvm install --lts then nvm use --lts on Mac or Linux. On Windows, run the new installer from nodejs.org or use nvm-windows. If you installed Node with Homebrew, run brew upgrade node. Check the result with node -v.
To update Node.js:
node -v.nvm install --lts, then nvm use --lts.nvm install lts with nvm-windows).brew upgrade node.node -v and npm -v.Source: nodejs.org download page, and the nvm (github.com/nvm-sh/nvm) and nvm-windows (github.com/coreybutler/nvm-windows) READMEs, checked 2026-11-28.
Setting up a new machine rather than updating one? Then you need to install Node.js instead; the steps differ slightly.
Checking your Node version first tells you what you're updating from and, often, how Node was installed. Run:
node -v
npm -vnode -v prints a version such as v26.13.1, the LTS release nodejs.org listed on 2026-11-28. Then run which node on Mac or Linux (where node on Windows) and look at the path: a folder inside ~/.nvm means nvm, /opt/homebrew means Homebrew. Update Node with the same tool you installed it with, or you can end up with two copies that compete on your PATH.
If node -v says command not found, install Node.js on your machine first.
New Node version? Re-run your Playwright or Cypress suite across browsers on TestMu AI before you ship, and run Playwright tests on cloud browsers after upgrading.
nvm (Node Version Manager) is the simplest way to update Node.js on Mac and Linux, because each version installs side by side and you can switch back at any time. Install the latest LTS and switch to it:
nvm install --lts
nvm use --ltsNew terminal windows still start with your old default version until you change it:
nvm alias default 'lts/*'The quotes stop zsh from treating * as a file pattern. Use nvm install node for the newest stable release instead (nvm skips alpha builds, so today that's the same as the LTS), and nvm ls to see the versions you have.
Updating Node.js on Windows works one of two ways, depending on how you installed it:
nvm install lts, then nvm list to see the new version number, and nvm use with that number, for example nvm use 26.13.1. If nvm use reports a permissions error, run the terminal as administrator.nvm-windows is a separate project from nvm for Mac and Linux, and its commands differ slightly. If you're moving from the installer to nvm-windows, its README recommends removing the existing Node.js install first.

If you installed Node.js with Homebrew, update it with Homebrew too:
brew update
brew upgrade nodeHomebrew's node formula follows the newest stable Node release, which can be a Current line rather than LTS. Versioned formulas such as node@<major> stay on their major line, so brew upgrade won't move them to a new major version; install the newer versioned formula for that. 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 Homebrew yet, install Homebrew on your Mac first.
To update Node.js to a specific version rather than the latest, name the version:
nvm install 26.13.1
nvm use 26.13.1With nvm, nvm install 26 gets the newest release in the 26 line. With nvm-windows, give the full version number (for example nvm install 26.13.1). If you use the Windows or macOS installer, download the version you need from the Previous Releases page on nodejs.org.
Some test tools need a particular Node version to drive a particular browser. If a suite breaks after an update, here's how to fix Node and Chrome version mismatches.
Global packages don't follow you to a new Node version under nvm, because each version it installs has its own global folder. To reinstall your global packages on the new version while you update:
nvm install --reinstall-packages-from=current 'lts/*'Before you update, list your global packages with npm ls -g --depth=0, then run the same command on the new version to check they all came across.
Updating npm is a separate step, and it doesn't update Node. Each Node release comes with its own npm; to get the newest npm on the Node version you're running, use:
npm install -g npm@latestWith nvm, nvm install-latest-npm does the same for the active Node version. Check the result with npm -v.
A .nvmrc file pins a Node.js version for one project, so everyone who works on it runs the same version. Create it in the project's root folder:
node -v > .nvmrcThen run nvm use (or nvm install) in that folder, and nvm reads the version from the file. To record the Node versions the project supports, add an engines field to package.json:
"engines": { "node": ">=26" }npm only warns when the package is installed as a dependency on a Node version that doesn't match, and it enforces the version only with engine-strict=true (for example in .npmrc). Pinning versions is one of our Node.js best practices.
LTS (Long-Term Support) lines get bug and security fixes for longer, which is why nodejs.org offers LTS as its main download and why it's the right choice for almost everything, production included. Since Node 27, each new major starts as an Alpha for about six months, becomes Current, where new features land first, for about six months, and then moves to LTS. As of late November 2026, the newest release is v26 LTS and v27 is still an alpha.
Move to a new LTS line on purpose, once your tests pass on it. After any update, run your tests; for plain JavaScript code, the built-in Node.js test runner (node --test) is a quick check.
With nvm, run nvm install --lts for the latest LTS, or nvm install node for the newest stable release (today the same as the LTS), then switch to it with nvm use. Without nvm, run the latest installer from nodejs.org, or brew upgrade node if you installed Node with Homebrew.
No. npm install -g npm@latest updates only npm. To update Node itself, use nvm, the nodejs.org installer or Homebrew; each Node release comes with its own npm.
Download the LTS installer (.msi) from nodejs.org and run it over your current install. If you use nvm-windows, run nvm install lts, then nvm use with the new version number.
Use LTS for almost everything, including production, because LTS lines get bug and security fixes for longer. New Node majors now start as an Alpha, become Current about six months later and then move to LTS. As of late November 2026, the newest release is v26 LTS and v27 is still an alpha.
It can, usually through a dependency or native module that doesn't support the new version yet. Check the engines field in package.json, reinstall your dependencies on the new version and run your tests before everyone on the team switches.
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