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:
- 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.)
- 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.
- 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 .
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!