Node.js lets you run JavaScript outside the browser, so it powers everything from small automation scripts to full web servers and APIs. On Windows 11, the install itself takes only a few minutes, but a rushed install is how people end up with two conflicting Node versions, a broken PATH, or npm errors on every project. This guide installs the LTS release correctly, verifies it properly, and shows you the two alternative methods professionals actually use.

By the end you will have Node.js and npm working in PowerShell, a first project that runs, and a clear way to switch versions later without reinstalling Windows or breaking old projects.

Prerequisites

  • A PC running Windows 11, 64-bit. Node.js no longer ships a 32-bit installer for current releases.
  • An administrator account for the installer, or permission to install software on the machine.
  • About 500 MB of free disk space, plus room for your projects.
  • A terminal: Windows Terminal, PowerShell, or Command Prompt. PowerShell is used in the examples below.
  • No other Node.js install you still need. If one is already installed, note its version first so you can decide whether to uninstall it or move to nvm-windows (Step 6).

Step 1: Decide which install method fits you

There are three well-supported ways to install Node.js on Windows 11, and the right one depends on how you will use it:

  • Official installer (recommended for most people): download the LTS .msi from nodejs.org. Simplest, and it sets up PATH for you.
  • winget: the same official build, installed from the command line. Good if you already manage software with winget.
  • nvm-windows: a version manager. Best if you work on multiple projects that need different Node versions.

Start with the official installer below. Steps 6 and 7 cover winget and nvm-windows so you can switch later without guessing.

Step 2: Download the LTS installer from nodejs.org

Always install the LTS (Long-Term Support) release for real work, not the Current release. LTS is the stable line most tutorials, frameworks, and production servers target. Current is for testing new features and changes more often.

  1. Open nodejs.org in your browser.
  2. Click the LTS download button for Windows. You will get a .msi installer file.
  3. Do not download Node.js from random mirror sites. The official site and winget are the only sources you should trust for the installer.

If you are following an old tutorial that names a specific version, do not hunt for that exact old installer unless the project genuinely requires it. Install LTS first, then use nvm-windows (Step 7) if one project needs an older version.

Step 3: Run the installer and choose the right options

  1. Double-click the downloaded .msi file and click Next through the welcome screen.
  2. Accept the licence agreement and keep the default install location unless you have a reason to change it. The default keeps PATH and uninstall behaviour predictable.
  3. On the Custom Setup screen, leave all components selected: Node.js runtime, npm package manager, and the online documentation shortcuts.
  4. On the Tools for Native Modules screen, you will see a checkbox to automatically install the necessary tools. Tick it if you plan to build native add-ons or use packages that compile code. The installer will then open a PowerShell window after setup and install build tools such as Python and Visual Studio Build Tools. This step can take several minutes and is safe to let finish.
  5. Click Install, approve the administrator prompt, and wait for the installer to finish. Click Finish.

Do not tick random extra options or change the install folder to a path with spaces or special characters unless a tool you use requires it. The defaults exist because they work with the widest range of packages.

Step 4: Verify the install in a fresh terminal

This step matters more than it looks. The installer updates PATH, but terminals you already had open still use the old PATH. Close every terminal window, then open a new PowerShell window.

node -v
npm -v
npx -v

The first command prints the Node.js version, the second prints the npm version that ships with it, and the third prints the npx version used to run packages without installing them globally. You should see three version numbers and no errors.

If you see all three, Node.js is installed correctly. If PowerShell says a command is not recognised, do not reinstall yet. Work through the troubleshooting section below first, because the cause is almost always an open terminal or a PATH problem, not a broken installer.

As an extra check, confirm where Windows is finding Node:

where.exe node
where.exe npm

Both commands should point inside the Node.js install folder. If they point somewhere unexpected, such as an old manual install, that is the conflict to clean up before you start projects.

Step 5: Create and run your first project

A version number proves the install works. A tiny project proves you can actually build with it.

  1. Create a project folder and move into it:
mkdir my-first-node-app
cd my-first-node-app

The first command creates the folder and the second moves your terminal into it, so everything that follows happens inside the project.

  1. Initialise the project:
npm init -y

This creates a package.json file with sensible defaults. The -y flag accepts those defaults so you are not answering prompts for a test project.

  1. Create a file named index.js with this content:
const http = require('http');

const server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('Hello from Node.js on Windows 11!\n');
});

server.listen(3000, () => {
  console.log('Server running at http://localhost:3000/');
});

This uses only Node's built-in http module, so it needs no extra packages and cannot fail because of a network or registry problem.

  1. Run it:
node index.js

You should see the "Server running" message. Open http://localhost:3000/ in your browser and you should see the hello message. Press Ctrl + C in the terminal to stop the server.

That is a complete loop: write code, run it, see it in the browser, stop it. Every larger Node project is the same loop with more files and dependencies.

Step 6: Alternative method — install with winget

If you prefer the command line, winget installs the same official LTS build. First uninstall any installer-based Node.js if you already completed Steps 2 to 4, so you do not end up with two copies. Then, in PowerShell:

winget install OpenJS.NodeJS.LTS

This downloads and installs the LTS package. Close and reopen your terminal, then run node -v and npm -v again to verify. To upgrade later, run:

winget upgrade OpenJS.NodeJS.LTS

Use winget or the installer, not both at once for the same Node install. Mixing installers is the most common cause of "I updated Node but the version never changed" on Windows.

Step 7: Alternative method — manage versions with nvm-windows

nvm-windows (not the same tool as nvm for macOS and Linux) lets you install several Node versions side by side and switch between them per project. This is the right choice once you maintain older projects.

  1. Uninstall any existing Node.js first. nvm-windows manages its own installs and conflicts with an installer-based copy.
  2. Download nvm-windows from its official GitHub releases page and run the installer.
  3. Install the LTS version and start using it:
nvm install lts
nvm use lts
node -v

The first command downloads the latest LTS release, the second makes it the active version in the current terminal session, and the third confirms it. To install another version, for example for an older project, run nvm install 20.19.0 with the exact version that project needs, then nvm use 20.19.0 when you work on it.

Keep one rule: a terminal window keeps the version you selected in it. Open a new terminal if a project seems to be running the wrong version after switching.

Step 8: Install global tools sparingly

Global packages are available in every terminal, which is convenient and also how PATH clutter starts. Install only tools you genuinely use everywhere, for example a process manager or a scaffolding tool, and keep project dependencies local to each project.

npm install -g npm-check-updates

This installs the named tool globally. The -g flag is what makes it global; without it, npm installs into the current project's node_modules folder instead. If a global install fails with a permission error, do not run your whole terminal as administrator every day. See the troubleshooting section for the safer fix.

Verify it worked

  • node -v, npm -v, and npx -v all print version numbers in a freshly opened PowerShell window.
  • where.exe node points to the install you intended, not an old copy.
  • Your test server runs with node index.js and answers at http://localhost:3000/.
  • Creating a new project with npm init -y creates a valid package.json without errors.

If all four pass, your setup is done. The rest of this guide is for when something does not pass.

Common issues and fixes

"node is not recognized" after installing

Close all terminal windows and open a new one. Terminals load PATH when they start, so an old window cannot see the new install. If a new window still fails, restart Windows once: a restart forces every process to pick up the updated PATH. Only reinstall after a restart still fails.

Two different Node versions depending on the terminal

You have two installs, usually one from the installer and one from winget, Chocolatey, or nvm-windows. Run where.exe node to list them, uninstall the ones you do not want from Windows Settings, then verify again in a fresh terminal. Keep exactly one install method per machine.

npm install fails with EPERM or permission errors

This usually means npm's cache or a project folder is owned by another user or locked by an antivirus scan. First, try again in a normal (not administrator) terminal after closing editors that may lock files. If the cache itself is the problem, clear it and retry:

npm cache clean --force

Do not make a habit of running npm as administrator. It masks the permission problem and can create files your normal user account cannot later modify.

The installer hangs on "Tools for Native Modules"

That step downloads and installs build tools and can legitimately take 10 minutes or more on a slow connection. Leave it running. If it truly stalls for over half an hour, cancel it, finish the Node install without that checkbox, and install build tools later only if a package actually asks for them. Most pure JavaScript projects never need them.

Port 3000 is already in use

Another server, often a previous test you forgot to stop, is already listening on port 3000. Stop it with Ctrl + C in its terminal, or change the port in your code to 3001 and retry. The error is about the port, not about Node.js.

An old tutorial's commands fail on the new version

Check the tutorial's Node version first. Some very old code uses features that were removed or changed. If the project is yours, update it to run on LTS. If it is someone else's legacy project, use nvm-windows to run the version it was written for rather than downgrading your whole machine.

Conclusion

Install LTS from the official source, verify it in a fresh terminal, and keep exactly one install method on the machine. That discipline prevents almost every Node.js setup problem on Windows 11. Once the basics work, your next step is a real framework or a small API project, and you will not be fighting the toolchain while you learn it.

If your team needs help standardising developer machines, server setups, or Node.js deployments, XpertBees can set up and document the whole stack for you.