DEV Community

arafatruetbd
arafatruetbd

Posted on

How to Install NVM on Windows

If you’ve ever worked on more than one Node.js project, chances are you’ve run into the dreaded “Wrong Node version” problem. One app needs Node v10, another uses v18, and suddenly you’re uninstalling and reinstalling Node.js every 15 minutes.

Yeah. It sucks.

The good news? There’s a much better way to manage this. It’s called NVM (Node Version Manager) — and yes, it works on Windows too! 🙌

Let me show you how to set it up.


🛠 Step-by-Step: Installing NVM on Windows

1. 🚫 First, Uninstall Any Existing Node.js

If you already have Node.js installed, go ahead and remove it. NVM will take care of installing and managing Node for you.

  • Open the Control Panel
  • Go to Programs → Uninstall a program
  • Find Node.js, right-click it, and choose Uninstall

This step helps avoid conflicts down the line.


2. 📦 Download NVM for Windows

Now grab the Windows version of NVM from the official GitHub repo:

👉 Download NVM for Windows

  • Scroll to the latest release
  • Download the file called nvm-setup.exe
  • Run the installer

3. 🧙‍♂️ Run the Installer

Just follow the prompts:

  • Leave the default install path (or pick your own)
  • It’ll ask for the Node.js installation path — again, the default is fine
  • Finish the setup

Boom. NVM is now installed.


4. ✅ Make Sure It’s Working

Open a new terminal window (PowerShell or Command Prompt) and type:

nvm version
Enter fullscreen mode Exit fullscreen mode

If you see a version number, you’re all set!


🎯 Using NVM Like a Pro

Let’s test it out.

➕ Install a Node Version

nvm install 16.20.0
Enter fullscreen mode Exit fullscreen mode

Want Node v10 for an old project?

nvm install 10.12.0
Enter fullscreen mode Exit fullscreen mode

🔀 Switch Between Versions

nvm use 16.20.0
Enter fullscreen mode Exit fullscreen mode

That’s it. Now when you run:

node -v
Enter fullscreen mode Exit fullscreen mode

You’ll see the version you just switched to.

📋 See What’s Installed

nvm list
Enter fullscreen mode Exit fullscreen mode

🧹 Remove a Version You Don’t Need

nvm uninstall 10.12.0
Enter fullscreen mode Exit fullscreen mode

😅 A Few Quick Tips

  • If nvm doesn’t work right away, restart your terminal (or open it as Admin).
  • Every version of Node you install via NVM is isolated — which means your global packages won’t carry over.
  • Want to go back to the system-installed Node? Just type:
  nvm off
Enter fullscreen mode Exit fullscreen mode

🎉 That’s It!

NVM is honestly one of the best tools you can install as a Node developer. It saves time, reduces headaches, and makes working on multiple projects way smoother.

No more uninstalling Node every week. No more version errors. Just run the version you need and get back to coding.

Happy hacking! 💻⚡

Top comments (0)