How to Check Which Node.js Version Is Installed
current stable releases (Python 3.12+, Node 22, Git 2.4x) on Mac, Linux, and Windows · Last checked · Suggest an edit
https://instructions.wiki/coding/check-which-node-version-is-installed
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.