Table of Contents
In this tutorial, you’ll learn What is NodeJs , How to Install NodeJs and NPM on Windows and more.
What is NodeJs ?
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user’s web browser. Consequently, Node.js represents a “JavaScript everywhere” paradigm, unifying web-application development around a single programming language, rather than different languages for server-side and client-side scripts.
How to install NodeJs and NPM on Windows
Step 1: Download NodeJs Installer
In a web browser, navigate to https://nodejs.org/en/download/. Click the Windows Installer button to download the latest default version. At the time this article was written, version 10.16.0-x64 was the latest version. The Node.js installer includes the NPM package manager.
Note: There are other versions available. If you have an older system, you may need the 32-bit version. You can also use the top link to switch from the stable LTS version to the current version. If you are new to Node.js or don’t need a specific version, choose LTS.
Step 2: Install NodeJs and NPM from Browser
- Once the installer finishes downloading, launch it. Open the downloads link in your browser and click the file. Or, browse to the location where you have saved the file and double-click it to launch.
- The system will ask if you want to run the software – click Run.
- You will be welcomed to the Node.js Setup Wizard – click Next.
- On the next screen, review the license agreement. Click Next if you agree to the terms and install the software.
- The installer will prompt you for the installation location. Leave the default location, unless you have a specific need to install it somewhere else – then click Next.
- The wizard will let you select components to include or remove from the installation. Again, unless you have a specific need, accept the defaults by clicking Next.
- Finally, click the Install button to run the installer. When it finishes, click Finish.
Step 3: Verify Installation
Open a command prompt (or PowerShell), and enter the following:
node -v
The system should display the Node.js version installed on your system. You can do the same for NPM:
How to Update NodeJs and NPM on Windows
The easiest way to update NodeJs and NPM is to download the latest version of the software. On the Node.js download page, right below the Windows Installer link, it will display the latest version. You can compare this to the version you have installed.
To upgrade, download the installer and run it. The setup wizard will overwrite the old version, and replace it with the new version.
How to Uninstall Node.js and NPM on Windows
You can uninstall Node.js from the Control Panel in Windows.
To do so:
- Click the Start button > Settings (gear icon) > Apps.
- Scroll down to find Node.js and click to highlight.
- Select Uninstall. This launches a wizard to uninstall the software.