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 .
- Nodejs | Automatic restart NodeJs server with nodemon
- How to resolve unhandled exceptions in Node.js ?
- Node | URL.resolve(from,to) API
- Node.js | dns.resolve() Method
- Node.js | dnsPromises.resolve() Method
- Node.js | path.resolve() Method
- JQuery deferred.resolve() method
- How to use External Modules and NPM in a project ?
- How to Load External JS Scripts Dynamically in AngularJS ?
- How to define the relationship between a document and the external resources?
- How to define a container for an external (non-HTML) application using HTML5?
- Why error "$ is not defined" occurred in jQuery ?
- Nodejs - Connect MongoDB with Node app using MongooseJS
- Cowsay in Nodejs using Requests library
- Nodejs | Web Crawling using Cheerio
- Web-Socket in NodeJS
- Signup Form Using Nodejs and MongoDB
- Dockerizing a simple Nodejs app
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.