My Feed
Create Team Blog
Let's kick off a fresh team blog! Bring on the crew and let's get to publishing.

Node.js on Windows - How to install Node.js for Windows 11

Fahad Conall's photo
Fahad Conall
·Oct 11, 2021·

2 min read

Node.js, an open-source platform built on Chrome's JavaScript runtime for quickly making fast, scalable network applications, has become extremely popular in recent years thanks to its speed and simplicity of use - especially among developers using Microsoft Windows as their operating system of choice.

These developers are often left wondering whether or not they can use Node.js on Windows, and if so, how to install Node.js on Windows 11 (or other versions). We will explore these questions further below...

Installing Node.js

After you've downloaded the Node, make sure you run npm install --global windows-build-tools. This will let us easily compile native modules later on. Now that we have that out of the way let's just run npm install --global node-gyp and then follow its instructions which you can also find on CoRepo !

It can be a little confusing at first because several files with similar names come from various sources (and it might even fail if you've already built everything), but it should work fine after one or two retries. Once completed, you should have both Node and NPM available to use immediately! Please test it out by typing node into your command prompt!

Running your first Node application

Once you have your Node.js runtime installed, you can start using it to run applications and create scripts. This step-by-step guide shows you how to write a simple application in Node.

It also covers how to run that application from Windows Command Prompt or Windows PowerShell instead of always running in a terminal window.

In addition, it helps you learn how to add logging statements to your app so that when something goes wrong—and when something always goes wrong—you'll know exactly what happened and where by reading through your app's console output log file(s).

You'll also learn how command-line arguments work in Node apps and why they're helpful in a scriptable environment like JavaScript is in Node.

Compiling Node from source

The node project itself isn't in a shape where they distribute binaries for every version, so compiling it yourself is standard practice if you're planning on running any of their bleeding edge versions or want to run node server without the installation hassle.

This guide will take you through downloading prerequisites, building, debugging and installing via NPM. I'm assuming that you have already installed Git and can clone repositories from GitHub using Git Shell or your favourite client.

If not, please follow one of these guides: Getting Started with GitHub Using git-SCM or The GitHub Guide if you use git command-line interface...