To verify Node.js installation, run node -v or node –version. This checks if Node.js is installed and working correctly.

Problem

Before you run any Node.js application or install packages, make sure Node.js and npm is installed in your machine.

Solution

You can check if Node.js is installed using the following terminal commands:

Step 1: Check Node.js Version

bash

node

If Node.js is installed, this will return a version like:

v24.3.0

Step 2: Check npm (Node Package Manager) Version

bash

npm

If npm is installed, this will return a version like:

10.5.0

Also Read: Top NodeJS Packages to Develop Apps Like a Pro

If You See an Error

If it returns something like command not found or ‘node’ is not recognized, then Node.js is not installed.

Bonus Tip

You can also check both at once using:

bash

node -v && npm -v

Conclusion

Verifying Node.js and npm installation is the first step in any Node project. Always check both before you start development.