How to Install NPM and Install Node.js in Windows 11

If you’re getting into JavaScript development — whether for web apps, backend projects, or tools like React and Vue — you’ll need Node.js and npm. Node.js lets you run JavaScript outside a browser, while npm (Node Package Manager) helps you install and manage packages that make development easier.

In this guide, we’ll walk you through how to install Node.js and npm on Windows 11, verify the installation, and make sure everything runs smoothly for your development setup.

What Are Node.js and npm?

Before jumping into installation, let’s quickly clear up what these two are:

  • Node.js is a JavaScript runtime that allows you to run JavaScript code on your computer, outside of a browser. It’s built on Chrome’s V8 engine and is perfect for building backend services, APIs, and command-line tools.
  • npm (Node Package Manager) comes bundled with Node.js and is used to install third-party libraries and frameworks — like React, Express, or Angular — directly into your projects.

You don’t need to install npm separately; it comes automatically with Node.js.

Install NPM and Install Node.js in Windows 11

1. Download Node.js for Windows 11

  1. Open your browser and go to the official Node.js download page.
  2. You’ll see two main versions:
    • LTS (Long-Term Support) – Recommended for most users. It’s stable and reliable.
    • Current – Includes the latest features but may not be as stable.
  3. Click “Windows Installer (.msi)” under the LTS version to download the installer.

This will download a .msi setup file (for example, node-v20.x.x-x64.msi).

2. Run the Node.js Installer

Once the file is downloaded, you can begin the installation:

  1. Double-click the .msi file to start the setup wizard.
  2. When prompted, click Next to continue.
  3. Accept the License Agreement and click Next.
  4. Choose the installation directory (it’s best to leave it as default).
  5. On the Custom Setup screen, make sure npm package manager is checked — it’s included by default.
  6. Keep clicking Next, then click Install.

When the setup finishes, click Finish to exit the installer.

3. Verify Node.js and npm Installation

After installation, let’s make sure everything is working correctly.

  1. Press Windows + X and choose Windows Terminal or Command Prompt.
  2. Type the following command to check Node.js version: node -v You should see something like: v20.11.1
  3. Next, check npm version: npm -v You should see a version number like: 10.2.3

If both commands return version numbers, congratulations — Node.js and npm are installed successfully on your Windows 11 system.

4. Update npm to the Latest Version (Optional)

npm is updated frequently, and you can easily upgrade it to the latest version.

In your terminal, run:

npm install -g npm@latest

This installs the latest npm globally on your system.
To confirm the update, check the version again using:

npm -v

5. Set Up the PATH Environment Variable (If Needed)

Usually, the Node.js installer automatically adds Node and npm to your system PATH.
However, if you ever get an error like 'node' is not recognized as an internal or external command', you’ll need to add it manually.

Here’s how:

  1. Press Windows + S and search for Environment Variables.
  2. Click Edit the system environment variables.
  3. In the System Properties window, click Environment Variables.
  4. Under System variables, select Path, then click Edit.
  5. Click New, and add these two paths (adjust if your version differs):
    C:\Program Files\nodejs\
    C:\Users\<YourUser>\AppData\Roaming\npm
  6. Click OK on all windows to save your changes.

Then, restart your terminal and try running node -v again — it should now work perfectly.

6. Test npm by Installing a Package

To confirm npm is working properly, you can install a test package.

For example, install the http-server package (a lightweight web server) globally:

npm install -g http-server

Once it installs, you can run:

http-server

If you see “Starting up http-server” and a local URL (like http://127.0.0.1:8080), npm is functioning correctly.

7. Uninstall Node.js (If You Need to Reinstall or Remove It)

If you ever need to uninstall Node.js, you can do it through the Control Panel:

  1. Press Windows + R, type appwiz.cpl, and hit Enter.
  2. Scroll through the list of installed programs and select Node.js.
  3. Click Uninstall, then follow the on-screen instructions.

This removes both Node.js and npm from your system.

You can always reinstall the latest version from the official Node.js website.

Conclusion

Installing Node.js and npm on Windows 11 is quick and straightforward — and it’s the first step toward building powerful JavaScript-based applications.

With Node.js installed, you can now run JavaScript outside the browser, build backend servers, and use npm to install thousands of useful packages for your projects.

Now that your setup is complete, you’re ready to dive into frameworks like React, Express, or Next.js — all powered by Node.js and npm.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.

X