nvm-windows: broken if username has space in it
Issue:
Most of the functionality is broken if the username has space in it, such as on
, off
, use
and uninstall
.
How To Reproduce:
- have space in username ( in one of my pcs, it’s Kd Puvvadi)
- Install
1.1.9
and upgrade to1.1.10
or install1.1.10
- run
nvm use 16.18.1
$ nvm use 16.18.1
exit status 1: 'C:\Users\Kd' is not recognized as an internal or external command,
operable program or batch file.
exit status 1: 'C:\Users\Kd' is not recognized as an internal or external command,
operable program or batch file.
nvm uninstall 16.16.0
Uninstalling node v16.16.0...exit status 1: 'C:\Users\Kd' is not recognized as an internal or external command,
operable program or batch file.
Expected Behavior:
When using uninstall
, it should uninstall the version and when using use
it should switch the version
Desktop:
- OS: Windows 10 Enterprise 22H2 19045.2251 Windows Feature Experience Pack 120.2212.4180.0
- Shell: Powershell Core
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 9
- Comments: 19 (1 by maintainers)
Yes, bump, still broken. I installed fresh directly from repo downloads section. Windows default user folder is “fname lastname” iirc, so this is likely breaking the entire product for most users and should be considered a critical bug.
Edit: If you’re finding this and looking for a fast fix, 1.1.9 does work correctly.
Fix for windows
Just run your cmd as administrator and it should work
I think this is still an issue
Workaround:
This works instantly. I’m not sure if you manually need to update the NVM_HOME env vars in system properties. (search for: “environment”)
It’s directly from this repo.
You can install latest version in non-default location. This works for me.
ex. c:/nvm
We both sound stuck then… 😦
All users in our network don’t have elevated privileges, that would be deal breaker too.
yes, but downgrading versions made it work at all.
Given the choice between
1.1.10
that’s totally broken and1.1.9
that just needs elevated privileges… 🤷@khill-fbmc problem with downgrading is, switching version needs elevated privileges.
I think it also might be broken if your name has an Å in it:
But this path exists: C:\Users\MårtenRånge\AppData\Roaming\nvm
I use 1.10.0 downloaded from github releases
Same here. It should be fixed, or at least mentioned in the docs. 1.1.10 makes no difference. Workaround: https://stackoverflow.com/a/62376230/1650907