Nvm-windows: exit status 1: 'C:\Users\Konrad' is not recognized as an internal or external command, operable program or batch file.

Created on 6 Nov 2018  ·  30Comments  ·  Source: coreybutler/nvm-windows

My Environment

  • [x] Windows 10
  • [x] My Windows installation is non-English.

I'm using NVM4W version:

  • [x] 1.1.7

I have already...

  • [x] read the README to be aware of npm gotchas & antivirus issues.
  • [ ] reviewed the wiki to make sure my issue hasn't already been resolved.
  • [ ] verified I'm using an account with administrative privileges.
  • [ ] searched the issues (open and closed) to make sure this isn't a duplicate.
  • [ ] made sure this isn't a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

  • [ ] settings.txt
  • [ ] proxy support (Have you tried version 1.1.0+?)
  • [ ] 32 or 64 bit support (Have you tried version 1.1.3+?)
  • [ ] Character escaping (Have you tried version 1.1.6+?)
  • [x] A standard shell environment (terminal/powershell)
  • [ ] A non-standard shell environment (Cmder, Hyper, Cygwin, git)

Expected Behavior

Change node version.

Actual Behavior

exit status 1: 'C:\Users\Konrad' is not recognized as an internal or external command,
operable program or batch file.

It spited my user folder in half by space.

Steps to reproduce the problem:

nvm use 11.1.0

duplicate

Most helpful comment

thanks @Mourdraug it worked !

Open Cmd, go to the Users directory, type dir /x and you will see the shortened version of the name of the users. (ALEXKA\~1 in my case)
Inside the nvm installation (AppData\Roaming\nmv in my case) there is a settings file, edit the first line and instead of having the space name put that shortened version and leave the rest the same like this :
root: C:\Users\ALEXKA~1\AppData\Roaming\nvm

All 30 comments

yep, seems like your user folder cannot contain whitespaces.

I see the same problem

Oh I was going to write this earlier but I forgot. You can actually edit config file to use DOS path convention (you can find correct short directory name with dir /x command) and theoretically easiest fix would be to create config using this convention in the first place, but this sounds more like hiding a bug than fixing it.

I would expect nvw-windows to work on windows by default.

same problem +1

thanks @Mourdraug it worked !

Open Cmd, go to the Users directory, type dir /x and you will see the shortened version of the name of the users. (ALEXKA\~1 in my case)
Inside the nvm installation (AppData\Roaming\nmv in my case) there is a settings file, edit the first line and instead of having the space name put that shortened version and leave the rest the same like this :
root: C:\Users\ALEXKA~1\AppData\Roaming\nvm

This is fixed in master. I just haven't had time to cut a release of 1.1.8.

Is it possible to build this on any windows machine? iscc the zip executable do not work. They are for 32 bit windows? The build bat doesn't work either.

If you used scoop to install nvm, the directory for the settings.txt file is

C:\Users\John Doe\scoop\persist\nvm\settings.txt

EDIT: You can also go nvm root to find the right directory.

Intsalled in C:/Program Files/.. couldn't find a workaround to get it working so far...

Hi, i just encountered the same issue on a Windows 10 system... i suspected that the user root path string parser can't deal with a space anywhere in the root path name... so i gave it the 7.3 DOS user path name instead as suggested above... J52B0~1.CLA in our case, and that indeed worked just fine, thanks.

Yep, that's still issue, 1.1.8 isn't out yet ie. the proper fix is still laying somewhere in commit log waiting for the next release. Until then, workaround mentioned above should do the job.

Still broken - spaces in file paths have been a thing for quite a while now!

1] In cmd go to the home directory (User in my case) Run "dir /x"
2] Find the short name for your directory (In my case Suyash Savji = SAVJIS ~~ 1)
3] Go to C:\Users\"Home File"\AppData\Roaming\nvm
4] Open settings.txt file and replace the home file name with the short name(In my case, Suaysh Savji :: SAVJIS~~1 )
5] In cmd go to the version file installed eg. v11.0.0 and then run "nvm use 11.0.0"

Great ! Followed the 5 steps, and it worked

Real big thank you for the solution !

thank you so much this is really helpful

tl;dr

Solved!!

For someone who is not able to work with ~1 method by @kirkouimet (Thanks mate) in #41
Open CMD go to the Users folder and Get the Shortened Folder name.

and type

> dir\x

Annotation 2020-05-25 112714

Now later after copying or Noting down the folder name
Annotation 2020-05-25 113201

Hope it helps

I have to say that fixing this problem manually by the user isn't a fix at all for me.
Windows can have spaces in folders names and many users have this (because of microsoft account) by default.
The fix should be provided in the nvm itself by developers not by the users who want to use it on their end.

@savjisuyash-code Thank you so much. it worked...!

@Swarag-N , thanks for the screenshots

Thank you so much for this

I DONT have any shortened user name what should i do??
Capture

@savjisuyash-code Worked perfectly thank you!

It didn't work for me...didn't get any shortened user name

It didn't work for me because I am not getting shortened name for my user

Faced the same issue and resolved it using these help

thanks @Mourdraug it worked !

Open Cmd, go to the Users directory, type dir /x and you will see the shortened version of the name of the users. (ALEXKA~1 in my case)
Inside the nvm installation (AppData\Roaming\nmv in my case) there is a settings file, edit the first line and instead of having the space name put that shortened version and leave the rest the same like this :
root: C:\Users\ALEXKA~1\AppData\Roaming\nvm

this worked for me. thank you so much! Especially given that doing everything else would take more time. this is awesomeeeeee

This is fixed in master. I just haven't had time to cut a release of 1.1.8.

So coming up on 2 years and the download installer is still 1.1.7... I get that this is free software (and I'm sure it will be VERY USEFUL once I get it working), but just out of curiosity, how long IS your development cycle? ;)

Still broken as of Dec/2020

Was this page helpful?
0 / 5 - 0 ratings

Related issues

janpio picture janpio  ·  3Comments

leiamac picture leiamac  ·  4Comments

martijnsenden picture martijnsenden  ·  3Comments

eliavmaman picture eliavmaman  ·  6Comments

petrovicz picture petrovicz  ·  4Comments