Open nbkhope opened 6 years ago
Just hit this same issue. It appears to be a result of the default installation folder being located under the install user's home folder. (C:\Users\XXX\AppData\Roaming\nvm) Other users on the machine will be denied access to that folder.
Try removing nvm and re-installing to a common folder location such as "C:\nvm".
@b-dur / @coreybutler - is there a reason any part of NVM needs to be installed globally on a machine? Or maybe rephrased - can't every part of NVM just be installed under Local AppData and the appropriate paths added to the current user's environment? This way any individual user's install of NVM and the currently in-use version of node/npm is completely independent of anyone else's? On Windows 10 anyway, I wouldn't see any problems with this; I'm pretty sure there wouldn't be any under Win7+.
@mattzuba I don't think there is anything blocking NVM for being installed in a global path. This PR #346 should fix this issue when merged.
I made this pre-release that hopefully should fix this bug: https://github.com/b-dur/nvm-windows/releases/tag/1.1.7 Can anyone confirm that?
Thank you for this.
I tried this pre-release on Windows 10. nvm installed into C:\ProgramData\nvm and I was able to access it from an account other than the one that installed it.
I hope I'm not off topic by mentioning this, but I am having one glitch with the environment variables created by this installer. NVM_HOME and NVM_SYMLINK are created as system-level environment variables, and both are inserted into the system-level path as %NVM_HOME% and %NVM_SYMLINK%, but the command interpreter doesn't resolve them into actual pathnames, and thus I can't find the executables. I'm working around this issue by adding %NVM_HOME% and %NVM_SYMLINK% to my user-level PATH environment variable. Windows resolves them into actual pathnames if I do that.
The problem still persists in the "1.1.7 - Maintenance Release". When I start the setup on a normal user account in Windows 10, I am prompted for an admin password. Later the "Select Destination Location" dialog defaults to the "C:\Users\XXX\AppData\Roaming\nvm" directory, where "XXX" is the admin user.
Same experience with both the previous comments.
I installed NVM in a global folder like @JohnMilazzo suggested and it started to work AFTER I logged off in all accounts and restarted Windows.
Instalé NVM en una carpeta global como@JohnMilazzosugirió y comenzó a funcionar DESPUÉS de cerrar sesión en todas las cuentas y reiniciar Windows.
esto funciono para mi, lo que hice es instalar en ruta de mi usuario normal y luego reiniciar la PC y funciono
Problem still persists. I tried adding the nvm folder to the path for the second user, as well as copying the NVM_HOME and NVM_SYMLINK variables like @lukeDeanDev suggests.
Can someone provide a working workaround? This is quite critical for me.
After installing I restarted my PC and nvm started to work , but "node" and "npm" was still not recognized , to make that work I had to run "nvm on" and then I was able to use node and npm commands . More Information
I installed NVM in a global folder like @JohnMilazzo suggested and it started to work AFTER I logged off in all accounts and restarted Windows.
Just want to say this solution still works originally I could not use NVM on my main user since I have a separate admin user. The fix did not fully take effect until I restarted my computer and dev env. Thanks everyone.
I remove the NVM_HOME and NVM_SYMLINK on system variable, add it to user variable
Then i update the NVM_HOME and NVM_SYMLINK in the Path variable in user variable
Repeat same step on another user then 2 accounts would not interferes with each other. Note that NVM_SYMLINK on 2 account must be different path
My Environment
I'm using NVM4W version:
I have already...
My issue is related to (check only those which apply):
Expected Behavior
nvm-windows
should work for any user account that installed it, without interfering with the other account.Actual Behavior
Installing nvm-windows in one account affects the other user account, rendering the former unable to use nvm-windows on the command line.
Steps to reproduce the problem:
Given two user accounts, UserA and UserB on Windows 10.
Comments
So is it by design that nvm-windows can only be used by one user account?