How to Check Which Node.js Version Is Installed

Check your Node.js and npm versions from the terminal, see which Node binary is running, and list every version if you use nvm.

A project complains that your Node version is too old, or two tools disagree about which Node they are using. One command answers it.

Run node with the version flag

node -v

This prints something like v22.11.0. node --version does the same thing.

Check npm too

npm ships with Node but has its own version number:

npm -v

If a project's package.json has an engines field, it may require a minimum of both.

See which Node binary is running

If you have more than one Node installed, find out which one node actually points to:

which node

On Windows Command Prompt use where node. A path under .nvm or .volta means a version manager is in charge; a path under /usr/local or Program Files means a system install.

List every installed version with nvm

If you use nvm, see all versions and which one is active:

nvm ls

The active one has an arrow. Switch with nvm use 20, or make it the default for new terminals with nvm alias default 20.

If node is not found. Node is not installed or not on your PATH. Install it from nodejs.org, or with nvm install --lts if you already have nvm.

More Coding how-tos