3

When I installed, it defaulted the root where it stores the different versions of Node as "C:\Documents and Settings(my name)\Application Data\nvm". I successfully installed version 0.12.4 through the command prompt, but now when I type "nvm use 0.12.4" it gives an error message: "Exit Status 1: C:\Documents is not recognized as an internal or external command, operable program, or batch file." So I gather that it doesn't like the blank spaces in the root path. I'm going to uninstall NVM and re-install specifying a different root during the install. Is there a different root directory that's generally used with NVM for Windows, or does it really matter, just as long as there are no blank spaces in the path?

Gal Margalit
  • 5,525
  • 6
  • 52
  • 56
Cmaso
  • 1,095
  • 1
  • 10
  • 23
  • 1
    nvm does **NOT** support Windows, what is clearly stated on the first line of [their repo](https://github.com/creationix/nvm#installation). – zaynetro Jun 09 '15 at 17:30
  • 1
    Not so -- the one I'm installing is NVM for Windows. See https://github.com/coreybutler/nvm-windows. – Cmaso Jun 09 '15 at 17:44
  • It seems to work just fine for me using the default install location, on 3 different machines. – Kevin B Jun 09 '15 at 18:15
  • Ah, i see. you're running it on older windows, hence the /documents and settings/ vs /users/. i'd expect any path to work, assuming you fix any permission problems that arise (if any). – Kevin B Jun 09 '15 at 18:18

1 Answers1

4

Here's an open issue with this problem: https://github.com/coreybutler/nvm-windows/issues/41

looks like it might get fixed soon, but until then, you can solve the problem yourself by editing your settings.txt

root: C:\DOCUME~1\<yourname>\...etc...
path: ...etc...

To get the correct path names without spaces, go to the parent directory and type dir /x (only works in cmd.exe, not powershell.)

Kevin B
  • 94,570
  • 16
  • 163
  • 180
  • 1
    Thanks Kevin - you beat me to the punch. :) For posterity, all I did was reinstall nvm, specifying "C:\" as the root during the install, so it's now storing all the versions of Node in "C:\nvm", which of course has no spaces. Just need to remember to cd to that directory in the command prompt before using any of the nvm commands, else you'll get a message saying it can't find settings.txt. Only downside is, since C isn't associated with any one user, when you switch to a version of Node it will ask which user account you want to use. But that's no big. – Cmaso Jun 09 '15 at 19:50
  • If you're using powershell, you might be able to automate some of that using a profile config, but i'm too noobish at that to suggest how to accomplish it :) i would have just fixed the settings.txt and called it a day. – Kevin B Jun 09 '15 at 20:04