Node.js is a run-time environment that comes with everything you need to run a JavaScript programme. Before content is sent to a web browser, it is used to run programmes on the server to render it.
Node Package Manager, or NPM, is a tool and repository for creating and exchanging JavaScript code.
This post will assist you in setting up Node.js, NPM, and other helpful Node.js commands on a Windows computer.
Prerequisites
a user profile with administrative rights (or the ability to download and install software)
Either Windows PowerShell (Search > PowerShell > right-click > run as administrator) OR the ability to use the Windows command line (Search > cmd > right-click > run as administrator)
How to Install Node.js and NPM on Windows
Step 1: Download Node.js Installer
Go to https://nodejs.org/en/download/ via a web browser. To get the most recent default version, use the Windows Installer option. Version 10.16.0-x64 was the most recent version at the time this article was written. The NPM package manager is included in the Node.js installer.
Note: Additional variants are accessible. You might require the 32-bit version if your computer is older. The top link can be used to change from the current version to the stable LTS version. Select LTS if you’re unfamiliar with Node.js or don’t require a specific version.

Step 2: Install Node.js and NPM from Browser
- Open the installer after it has finished downloading. Click the file after opening the downloads link in your browser. Alternatively, you can double-click the file by navigating to the location where you stored it to start it.
- Click Run when the system prompts you to run the programme.
- After being welcomed, click Next to see the Node.js Setup Wizard.
- Examine the license agreement on the next screen. If you are ready to install the software and accept the terms, click Next.
- The installer will ask you where you want to install it. Click Next after selecting the default location unless you have a reason to install it somewhere else.
- You can choose which components to include or leave out of the installation using the wizard. Again, click Next to accept the settings unless you have a compelling need to change them.
- To launch the installer, click the Install option. Click Finish when it’s finished.
Also Read: Best Ways to Check Hard Disk Health in Windows
Step 3: Verify Installation
Launch PowerShell or a command prompt and type the following:
node -v
The Node.js version that is currently installed on your machine ought to be visible. The same applies to NPM:
npm -v
Using CMD, test Node JS and NPM on Windows.
How to Update Node.js and NPM on Windows
Downloading the most recent version of Node.js and NPM is the simplest approach to updating them. The most recent version will be shown just beneath the Windows Installer link on the Node.js download page. This can be contrasted with the installed version.
Download the installer, then launch it to upgrade. The installation wizard will replace the previous version with the new one.

How to Uninstall Node.js and NPM on Windows
Node.js can be removed from Windows’ Control Panel.
To do this:
Select “Start” > “Settings” (the gear icon), then “Apps.”
Click to highlight Node.js after scrolling down to find it.
Choose Uninstall. This starts the programme uninstall wizard.
Also Read: How to Keep All Your Programs Up-To-Date on A Windows Computer: Everything You Need to Know
Basic Node.js Usage
Node.js is a framework, thus it doesn’t function like a typical application. Instead, it translates the instructions you type. Make a Hello World script to test your new Node.js installation.
- Start by opening your preferred text editor.
- After that, paste the subsequent content into the text editor you just launched:
- After saving the file, go away. Launch PowerShell and type the following commands:
Users your username> node
myprogram.js
It will appear that nothing has changed. Your script is actually executing in the background. If Windows Defender displays a warning about permitting traffic, click Allow for the time being.
- After that, launch a browser and type the following into the address bar:
http://localhost:8080
You should see the words “Hello World” in the upper-left corner.
Your computer is currently working as a server. The Hello World message will appear on any other computer that tries to access your system via port 8080.
Switch back to PowerShell and hit Ctrl+C to end the programme. The command prompt will appear once more on the computer. This window may be closed anytime you are prepared.
Conclusion
Both the Node.js framework and the NPM package management should now be installable. Additionally, you’ve created your first JavaScript node.js programme!
Numerous other JavaScript solutions are available through the NPM framework and can be accessed at npmjs.com.
For More Information Visit Our Site: https://www.techllog.com/