How to Install NodeJS on Windows Server 2019

Node.js is an open-source, cross-platform runtime environment that allows developers to execute JavaScript code outside of a web browser. It’s widely used for building scalable network applications, server-side scripts, and real-time applications. Node.js comes with npm (Node Package Manager), which helps in managing packages and dependencies.

Prerequisites

  • Windows Server 2019 installed and running.
  • Administrator access to the server.

Step 1: Download Node.js Installer

Visit the Node.js Official Website

Go to Node.js official website to download the latest LTS (Long Term Support) version, which is recommended for most production environments.

images

Choose the Correct Installer

Select the appropriate installer for your system architecture (e.g., 64-bit) and click to download the .msi file.

images

Step 2: Run the Node.js Installer

Launch the Installer

Locate the downloaded .msi file and double-click it to begin the installation process.

images

Follow the Setup Wizard

Welcome Screen: Click Next to continue.

images

License Agreement: Read and accept the license agreement, then click Next.

images

Choose Installation Folder: Select the installation folder or use the default location, then click Next.

images

Select Components: Ensure all necessary components (Node.js runtime, npm package manager, etc.) are selected, then click Next.

images

Install Tools for Native Modules (Optional): If prompted, you can choose to install additional tools like Python and Visual Studio Build Tools, which are useful for building native modules.

images

Start Installation

Click Install to begin the installation process. This may take a few minutes.

images

images

Once done click finish to complete.

images

Once completed it'll pop-up terminal and it'll take time to install/propogate

images

images

Step 3: Verify Node.js Installation

Open Command Prompt

After installation, open a command prompt (search for "cmd" in the Start menu).

images

Check Node.js Version

Type the following command and press Enter to verify the Node.js installation:

node -v

Output:

You should see the version number displayed.

images

Check npm Version

Similarly, verify npm installation by typing:

npm -v

Output:

This will display the npm version number.

images

This guide provides a comprehensive walkthrough for installing Node.js on Windows Server 2019.