node: command not found

command-not-found

Updated August 29, 2026

bash: node: command not found or zsh: command not found: node means the current shell cannot resolve the Node.js executable. Check both the installation and the shell path before reinstalling anything.

command -v node
node --version
printf '%s\n' "$PATH"

If you use nvm, open a new terminal and make sure the nvm initialization lines are present in the shell profile. Then select an installed version:

nvm ls
nvm use --lts

If nvm is also missing, follow the current installation instructions in the nvm project rather than pasting an old version-specific command. A package-manager installation may instead place Node in /usr/bin or another documented directory. Do not mix several Node installers until you know which one owns the executable.

For a project-specific tool, use the project instructions. npm scripts can resolve local binaries from node_modules/.bin even when a package is not installed globally. Once the command works, verify the package manager too with npm --version and keep the selected Node version consistent with the project's engines field.

Sources

related.

Ruslan Osipov

Ruslan Osipov

About the author