Node.js beginner 15 min

Checking Node.js Version

Learn about Checking Node.js Version in Node.js.

Checking Node.js Version

After installing Node.js, you should check that it is installed correctly. You can do this with a simple terminal command.

Using node -v

Open your terminal and run:

node -v

This will print the version number. For example: v20.10.0

Using node --version

You can also use the longer form:

node --version

Both commands do the same thing.

What If You See an Error?

  • If you see command not found, Node.js is not installed or not added to your system path.
  • Try closing and reopening your terminal.
  • If the error continues, reinstall Node.js.

Practice

Run both node -v and node --version on your computer. Write down the version number you see.