How to Install NodeJS on Windows Server 2016
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 2016 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.
You can select the appropriate installer for your system architecture (e.g., 64-bit) and proceed to download the
.msi
file.
Step 2: Run the Node.js Installer
Launch the Installer: Locate the downloaded .msi
file and double-click it to begin the installation process.
Follow the on screeen Setup Wizard:
Welcome Screen: Click Next to continue.
License Agreement: Read and accept the license agreement, then click Next.
Choose Installation Folder: Select the installation folder or use the default location, then click Next.
Select Components: Ensure all necessary components (Node.js runtime, npm package manager, etc.) are selected, then click Next.
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.
Start Installation:
Click Install to begin the installation process. This may take a few minutes.
Once done click finish to complete.
Once completed it'll pop-up terminal and it'll take time to install/propogate
Step 3: Verify Node.js Installation
Open Command Prompt: After installation, open a command prompt (search for cmd in the Start menu).
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.
Check npm Version: Similarly, verify npm installation by typing:
npm -v
Output:
This will display the npm version number.
This guide provides a comprehensive walkthrough for installing Node.js on Windows Server 2016.