[ ] Windows Server 2016
[ ] My Windows installation is non-English.
As the readme says, after installing, I should be able to open a command window and type nvm
to get more help.
Installer reported no errors, but:
C:\Users\me>nvm
'nvm' is not recognized as an internal or external command,
operable program or batch file.
nvm
Can confirm this, here is my output of the two envorinment variables:
位 echo %NVM_HOME%
C:\Users\thunder\AppData\Roaming\nvm
位 echo %NVM_SYMLNK%
%NVM_SYMLNK%
NVM_SYMLNK
seems to be empty
Here's something interesting I found. I'd been previously unaware that each user could have their own environment variables in Windows. If you hit Start and type "env" you'll see such an option. In that window, which looks exactly like the system one you get via Computer Properties->Advanced->etc. except that it's for your user instead of for the administrator user, there are two sections, one for the user, one for system.
After these two install attempts, I see that my current user one doesn't have it under 'user', but it does exist under 'system'. In the admin user it exists in under 'user' (well, under both, but the system one is common to both.)
The problem for me is different than @timaschew : both of those env vars are defined (and echo properly at the command line) but nvm
still doesn't find anything. AFAICT it's because %NVM_HOME% is defined using the admin user's AppData path, which my regular user account does not have access to.
OTOH this may just be because I installed first as my regular user, and then tried installing as admin. Let me try as a regular user again.
Ah, I see: simply double-clicking the installer does not install as my regular user--it asks for admin creds. I had thought it does this to confirm you want to install the software, not to actually switch over to be the admin while you install. Thus, in the installer, the default install directory is under the admin's appdata.
OTOH the symlink is under Program Files for the binary. I get the rationale of using AppData since you're going to install other things there, and also because you want to keep it separate per user, but is there no way to run the installer in a regular user context?
AFAICT it's because %NVM_HOME% is defined using the admin user's AppData path, which my regular user account does not have access to.
Wait, that's not true either. It's not finding nvm in the %PATH%. The installer adds %NVM_HOME% to the path, but not %NVM_SYMLINK%'s dir.
Does %NVM_HOME%
have nvm.exe
in it, for you?
I first installed in the default AppData Roaming, and received an error about installing unins000.exe
(it complained about access permissions, I think).
Then, after checking, all the Env Vars were correct.
Then I checked the AppData dir, and noticed nvm.exe
didn't exist.
I deleted everything, and re-ran the installer but changed the installation directory (to a different drive, fwiw). I didn't receive an uninstaller error, and nvm.exe
exists in that directory, and all the Paths were correct.
The installer is designed for Windows 8.1+. If something fails in Windows 7, try the manual installation option (listed in the wiki).
Closing due to age and Windows 7 support.
Never ending path problems on windows 10.
So if I install in cmd using either local account or administrator account, I cannot call NPM from inside any batch files on the system that are running as administrator.
Any ideas?
I know this issue is closed but I'm having the same problem with Windows 8.1
On Win8.1+, close the terminal and re-open it. Sometimes Windows lags behind and sets the PATH after the terminal window opens. Reopening it fixes it. If not, open a new issue. These closed issues often get lost.
On Windows 7, nvm is installed under the administrator account. This is what I have done to resolve this:
During install of nvm, set the root path to (change to suit) C:\Node\nvm
and change the Symlink path to C:\Node\nodejs
Nvm has now been added to your system/admin path but not your users'.
In the start menu, search for env
and open Edit environment variables for your account.
Edit your path to include %NVM_HOME%;%NVM_SYMLINK%;
You should now be able to call nvm
without using an administrator cmd window.
Most helpful comment
Can confirm this, here is my output of the two envorinment variables:
NVM_SYMLNK
seems to be empty