coreybutler / nvm-windows

A node.js version management utility for Windows. Ironically written in Go.
MIT License
37.28k stars 3.32k forks source link

[Issue]: `nvm use` command does not select any version #1116

Closed BartoszKlonowski closed 6 months ago

BartoszKlonowski commented 6 months ago

What happened?

When using use command, nothing is really selected. The response from use command is that given version is now used, however, when checking for current the response is that no version is currently used.

What did you expect to happen?

When using use command the selected version should be used.

Version

1.1.11 or newer (Default)

Which version of Windows?

Windows 10 (Default)

Which locale?

None

Which shell are you running NVM4W in?

PowerShell

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

None

Relevant log/console output

PS C:\Users\Bartosz> nvm version
1.1.12
PS C:\Users\Bartosz> nvm list

    20.9.0
    16.6.1
    14.17.3
PS C:\Users\Bartosz> nvm use v20.9.0
Now using node v20.9.0 (64-bit)
PS C:\Users\Bartosz> nvm current
No current version. Run 'nvm use x.x.x' to set a version.

Debug Output

PS C:\Users\Bartosz> nvm debug
Running NVM for Windows with administrator privileges.

Administrator: Windows PowerShell
Windows Version: 10.0 (Build 19045)

NVM4W Version:      1.1.12
NVM4W Path:         C:\Users\Bartosz\AppData\Roaming\nvm\nvm.exe
NVM4W Settings:     C:\Users\Bartosz\AppData\Roaming\nvm\settings.txt
NVM_HOME:           C:\Users\Bartosz\AppData\Roaming\nvm
NVM_SYMLINK:        C:\Program Files\nodejs
Node Installations: C:\Users\Bartosz\AppData\Roaming\nvm

Total Node.js Versions: 3
Active Node.js Version: v20.9.0

IPv6 is enabled. This can slow downloads significantly.

WARNING: The following Node installations are missing npm: v16.6.1
         (Node will still run, but npm will not work on these versions)

No problems detected.

Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues

Anything else?

No response

BartoszKlonowski commented 6 months ago

The root cause of this issue was the missing path to node executable in the PATH environment variable. Adding it to PATH allowed nvm to find node exec and select version.

Praveenrsm commented 6 months ago

the verion of node was not changing

Ken-Scofield commented 5 months ago

how to reslove this problems?

Ken-Scofield commented 5 months ago

@BartoszKlonowski please help me ! add nodejs root path to env?