How to resolve ‘node’ is not recognized as an internal or external command error after installing Node.js ?

There are many different ways to install node.js on a computer. The simplest method to verify whether node.js has been properly installed in your computer is simply type node-v in the command prompt or Windows PowerShell.

But many times, it happens, most commonly if you’re a beginner, the command prompt prints the output something like this:

'node' is not recognized as an internal or external command,
operable program or batch file.

This is the most common error and it is very simple to resolve this. It might be a case that the user might have properly installed node from the official node website. But sometimes, the reason is that the path variable is not defined in your system. So to properly define a path variable and resolve this error, follow these simple steps:

  1. Open the Environment Variables option in your Control Panel. (Go to Control Panel -> System and Security ->System -> Advanced System Settings-> Environment Variables ->User Variables or System Variables.)
  2. Select the variable named Path. A dialogue box named Edit user variable will appear. In the variable value option inside that dialogue box, paste the complete path of the location where node.js is installed in your system.Then click on OK.
  3. Restart the command prompt again and now verify by typing node-v in the command prompt. It will now display the version of the node which you’ve installed from the internet .
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.