Node.js is an open source platform that allows easy scalability of applications. With Node.js installed on your system, you can run JavaScript without being dependent on any browser. Given its efficiency and speed, it is the absolute choice for data streaming, data-intensive applications that run across distributed applications.
We can make use of custom modules to extend the functionality of Node.js One such example of a module is the MongoDB module. With the MongoDB module, you can use the MongoDB database with your Node.js applications. If you need any help with the installation of MongoDB on your Ubuntu system, here’s the link on How to Install MongoDB on Ubuntu
In order to start using Node.js to build applications, you need to install it on your system. Node.js is available for various operating systems such as Ubuntu, Windows and OS X. In the previous blogs, we have discussed the topic – How to Install Node.js on Ubuntu
Starting with the Installation
There are various available methods to download Node.js on Windows. We will prefer the easiest and most convenient methods. You can download Node.js directly along with its package installer.
Let us have a look at How to Install Node on Windows.
Steps to Install Node.js on Windows
Follow the below mentioned steps, to start using your Node.js on Windows system
1. Download Node.js
Visit the official Node.js website – https://nodejs.org/en/ and download the available msi installer.
You can select either of the 2 versions LTS or . I am preferring the one which is recommended for users – Node version 10.15.3 & npm version 6.4.1.
Click on the 32-bit/64-bit as per your system requirement.
I am choosing the 64-bit msi file (16.3 MB), it will hardly take a minute to download the msi file.
2. Install Node.js on Windows
Double click and run the .msi installer in order to install Node on Windows.
A bunch of prompts appear while installation on the Node.js Setup wizard.
Click Accept and Continue and proceed by clicking on Next, until Finish. Node.js is now installed on your Windows system.
Install NPM on Windows alongwith Node.
3. Run Node.js
In order to start using Node.js on your Windows machine, you will have to restart your computer.
You can test if Node.js has been properly installed by using these commands on your command prompt.
Check Node version
node -v
To test NPM – Check npm version by using
npm -v
Create a JS file to Test Node
You can also create a JavaScript file and run it. Name a file create.js, add some code to the file.
// create.js
console.log ('Ready to use Node!')
Run Node
Open the cmd prompt and cd (change directory) the path where the file is saved, run the file
node create.js
This will run the code in the file by starting Node.
Upgrade NPM
If you wish to upgrade just NPM (the Package manager for Node) on Windows. Run PowerShell as administrator and run the following commands.
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
Upgrade Node.js
If you wish to Upgrade NodeJS on Windows
Repeat the steps mentioned above (From Step 1 to Step 3) to download the Latest Node.js version available for your Windows system and Install it.
The installation will replace the Older Nodejs and NPM with the newer ones.
Uninstalling Node.js on Windows
You can uninstall Node.js by following these simple steps.
- Open the Control Panel from the Windows menu
- Open ‘Programs and Features’ option
- Click on Uninstall a program
- Locate Node.js and click Uninstall