DEV Community

Ryo Kuroyanagi
Ryo Kuroyanagi

Posted on

"nvm use" does not work with nvm-windows

TL;DR
If "nvm use" command does not work with nvm-windows on your windows PC, please create C:\nvm4w folder. (When you used installer with the default settings.)

Phenomena

I installed nvm with the installer (v1.2.1). I tried a simple nvm use 20.18.1 (or whatever version you were targeting) and was met with a frustrating error.

It seems that the command succeeded. It says Now using node v20.18.1 (64-bit). But it does not activate the version actually.

If the command succeeded, nvm list should show the following output.

PS C:\Users\myusername> nvm list

    22.12.0
  * 20.18.1 (Currently using 64-bit executable)
Enter fullscreen mode Exit fullscreen mode

But it just showed

PS C:\Users\myusername> nvm list

    22.12.0
    20.18.1
Enter fullscreen mode Exit fullscreen mode

Solution

By checking Internet, I found that it creates C:\nvm4w and a symlink in it when the command succeeds. I did not see the folder on my PC.

So, I created C:\nvm4w by myself and nvm use command worked.

My setup

  • OS Edition: Windows 11 Home
  • OS Version: 24H2
  • OS Build: 26100.2605

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay