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

Top comments (0)