How can I install npm on Windows without using the Node.js MSI installer?

I’m using nvm on Windows to manage Node.js versions, and while I was able to install the version of Node.js I need, I noticed that npm wasn’t installed alongside it.

Unfortunately, npm’s official site doesn’t provide clear instructions on how to install it separately.

Most guides I’ve found rely on the Node.js MSI installer to get npm set up, but that’s not an option in my case.

So I’m stuck trying to figure out how to install npm on Windows manually, ideally in a way that works cleanly with nvm.

Has anyone dealt with this before?

What’s the best way to manually add npm after installing Node.js via nvm on Windows?

Hey, I ran into this same issue a while back.

When using nvm for Windows, sometimes npm doesn’t get installed properly with Node, even though it’s supposed to.

What worked for me was this:

bash
Copy
Edit
nvm uninstall 18.16.0
nvm install 18.16.0

Just make sure you run the nvm install again (not nvm use) npm usually comes bundled with Node, so a fresh install often solves it.

This is still the cleanest way to install npm on Windows if you’re using nvm.

Yep, had to go the manual route once too.

Here’s what I did to install npm on Windows manually after using nvm:

  1. Go to https://github.com/npm/cli/releases

  2. Download the .zip for your preferred npm version.

  3. Extract it somewhere (I did C:\tools\npm).

  4. Add that folder to your system PATH.

Then run:

bash
Copy
Edit
npm -v

It should now work.

Just make sure your Node version from nvm is still active when using it.

Not the prettiest solution, but it works well if you’re stuck.