You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installed using UAC with a different admin account
In PowerShell $env:PATH returned %NVM_HOME% and %NVM_SYMLINK% not the expanded variables. It sometimes worked in Command Prompt.
This is because the User Environment variables are created against a different user to current user, and NVM_HOME NVM_SYMLINK and Path are all REG_EXPAND_SZ so indeterminate which order they will be evaluated in.
This meant that nvm was not always found
What did you expect to happen?
$env:PATH should have included the actual install locations
Justin.Mellor is not using admin or elevated rights.
Windows Version: 10.0 (Build 26100)
Windows Developer Mode: UNKNOWN
NVM4W Version: 1.2.2
NVM4W Author Bridge: 1.0.1
NVM4W Path: C:\Users\Justin.Mellor\AppData\Local\nvm\nvm.exe
NVM4W Settings: C:\Users\Justin.Mellor\AppData\Local\nvm\settings.txt
NVM_HOME: C:\Users\Justin.Mellor\AppData\Local\nvm
NVM_SYMLINK: C:\nvm4w\nodejs
Node Installations: C:\Users\Justin.Mellor\AppData\Local\nvm
Default Architecture: 64-bit
Mirrors: No mirrors configured
HTTP Proxy: none
Total Node.js Versions: 1
Active Node.js Version: v20.17.0
IPv6 is enabled. This has been known to slow downloads significantly.
No problems detected.
⚠️ NVM for Windows will eventually be succeeded by Author/Runtime
Find help at https://github.com/coreybutler/nvm-windows/wiki/Common-Issues
Anything else?
The problem comes because the installer uses RegWriteExpandStringValue() for NVM_HOME and NVM_SYMLINK. It should be using RegWriteStringValue() because these variables do not need to use expansion. This ensures that Path can expand the values as it will be evaluated after.
I have a PR for a fix
The text was updated successfully, but these errors were encountered:
What happened?
Installed using UAC with a different admin account
In PowerShell $env:PATH returned %NVM_HOME% and %NVM_SYMLINK% not the expanded variables. It sometimes worked in Command Prompt.
This is because the User Environment variables are created against a different user to current user, and NVM_HOME NVM_SYMLINK and Path are all REG_EXPAND_SZ so indeterminate which order they will be evaluated in.
This meant that nvm was not always found
What did you expect to happen?
$env:PATH should have included the actual install locations
Version
1.2.0 or newer (Default)
Which version of Windows?
Windows 11+ (Default)
Which locale?
English (Default)
Which shell are you running NVM4W in?
PowerShell
User Permissions?
Standard Use, Non-Elevated
Is Developer Mode enabled?
No (Default)
Relevant log/console output
Debug Output
Anything else?
The problem comes because the installer uses RegWriteExpandStringValue() for NVM_HOME and NVM_SYMLINK. It should be using RegWriteStringValue() because these variables do not need to use expansion. This ensures that Path can expand the values as it will be evaluated after.
I have a PR for a fix
The text was updated successfully, but these errors were encountered: