How to install or upgrade Node.js 22+ for SpecDD
SpecDD CLI installs with npm or Yarn require Node.js 22 or newer. This guide shows how to check your current version, install or upgrade Node.js on major operating systems, and verify that npm is available.
Use your operating system package manager first when it can provide Node.js 22 or newer. Use nvm only as the fallback
when system packages are unavailable or too old for SpecDD.
Steps
1. Check your current version
Run:
node -v
npm -v
The Node.js line must start with v22, v23, v24, or a higher major version. If node or npm is missing, or if
the Node.js major version is below 22, install a newer runtime.
2. Debian and Ubuntu
Use apt first:
sudo apt update
sudo apt install nodejs npm
node -v
npm -v
Some Debian and Ubuntu releases package an older Node.js LTS. If the installed version is below v22, use the nvm
fallback later in this guide.
3. Fedora
Use dnf:
sudo dnf install nodejs
node -v
npm -v
Fedora also publishes versioned Node.js packages on supported releases. If nodejs installs a version below 22, install
a versioned package such as nodejs24 or nodejs22 when your Fedora release provides it:
sudo dnf install nodejs24
node -v
npm -v
4. RHEL, CentOS Stream, Rocky Linux, and AlmaLinux
Use the Node.js module stream from your enabled repositories:
sudo dnf module list nodejs
Choose a stream that is 22 or newer, then install it. For example, when a 24 stream is available:
sudo dnf module install nodejs:24/common
node -v
npm -v
If your enabled repositories do not provide a 22 or newer stream, use the nvm fallback.
5. Arch Linux
Use pacman:
sudo pacman -Syu nodejs npm
node -v
npm -v
If you specifically want the Node.js 22 LTS line while it is still supported in Arch, use the matching LTS package:
sudo pacman -Syu nodejs-lts-jod npm
node -v
npm -v
6. openSUSE
Use zypper and install a 22-or-newer package provided by your openSUSE release:
sudo zypper refresh
sudo zypper install nodejs22
node -v
npm -v
If npm -v is not available after installing Node.js, install the matching npm package your release provides, such as
npm22, then verify again.
7. macOS
Use the official macOS installer from the Node.js download page . Choose the current LTS release or another supported release that is 22 or newer.
After the installer finishes, open a new terminal and run:
node -v
npm -v
8. Windows
Use the official Windows installer from the Node.js download page . Choose the current LTS release or another supported release that is 22 or newer.
After the installer finishes, open a new PowerShell window and run:
node -v
npm -v
If you work inside WSL, install Node.js inside the WSL Linux distribution with that distribution’s package manager. Keep the project files in the same environment where Node.js is installed.
9. Use nvm when system packages are too old
Use this path only when your Linux, WSL, or other Unix-like system package manager cannot provide Node.js 22 or newer.
Follow the current install command from the nvm project
,
then open a new shell and install the latest LTS release:
nvm install --lts
nvm use --lts
nvm alias default 'lts/*'
node -v
npm -v
If the latest LTS is ever below 22 on your system, install a specific supported major:
nvm install 22
nvm use 22
node -v
npm -v
Common mistakes
- Installing
nodejsbut not checking that the major version is 22 or newer. - Mixing system Node.js and
nvmin the same shell without checking whichnodeis first onPATH. - Installing Node.js on Windows but running SpecDD inside WSL, where Node.js is still missing.
- Using a distro package from an older OS release and assuming it satisfies the SpecDD CLI requirement.