Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 of 14 tasks
KonradLinkowski opened this issue Nov 6, 2018 · 51 comments

Comments

@KonradLinkowski
Copy link

My Environment

  • Windows 10
  • My Windows installation is non-English.

I'm using NVM4W version:

  • 1.1.7

I have already...

  • 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+?)
  • 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

@Mourdraug
Copy link

yep, seems like your user folder cannot contain whitespaces.

@marcoancona
Copy link

I see the same problem

@Mourdraug
Copy link

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.

@KonradLinkowski
Copy link
Author

KonradLinkowski commented Nov 17, 2018

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

@algoshipda
Copy link

same problem +1

@alexkar13
Copy link

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

@coreybutler
Copy link
Owner

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

@insuusvenerati
Copy link

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.

@nnzo
Copy link

nnzo commented Apr 26, 2019

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.

@ian1dunn ian1dunn mentioned this issue Jun 21, 2019
25 tasks
@stefanbschneider
Copy link

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

@Integrion
Copy link

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.

@apihlaja
Copy link

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.

@stevebaxter
Copy link

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

@savjisuyash-code
Copy link

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"

@laurentmenard
Copy link

laurentmenard commented May 14, 2020

Great ! Followed the 5 steps, and it worked

@PratikSaha198
Copy link

Real big thank you for the solution !

@ukaemma2
Copy link

thank you so much this is really helpful

@Swarag-N
Copy link

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

@KonradLinkowski
Copy link
Author

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.

@shahkv95
Copy link

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

@cfdeveloper84
Copy link

@Swarag-N , thanks for the screenshots

@ezrankala
Copy link

Thank you so much for this

@sgoyal2402
Copy link

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

@arya18mak
Copy link

@savjisuyash-code Worked perfectly thank you!

@aaztha
Copy link

aaztha commented Jun 22, 2020

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

@Heet1996
Copy link

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

@Ashanmg
Copy link

Ashanmg commented Nov 24, 2020

Faced the same issue and resolved it using these help

@junnysmiles
Copy link

junnysmiles commented Nov 30, 2020

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. (ALEXKA1 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

@clevengr
Copy link

clevengr commented Dec 5, 2020

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? ;)

@leonardoraele
Copy link

Still broken as of Dec/2020

@albert2k21
Copy link

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.

How did you do this?

@albert2k21
Copy link

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. (ALEXKA1 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

How did you do this?

@ashna99
Copy link

ashna99 commented Feb 8, 2021

Thanks @Mourdraug it really solved the issue!!

@VirtueAndTerror
Copy link

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"

I followed the 5 steps and solve the issues. Thank you!

@onyet
Copy link

onyet commented Apr 21, 2021

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. (ALEXKA1 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

Thanks... you save my time. 🥇

@shivam67847
Copy link

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"

worked for me, thanks ....
. you saved my time

@shopifyfullstackdev
Copy link

shopifyfullstackdev commented Aug 3, 2021

@Swarag-N

Thank you so much

@Fighteros
Copy link

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. (ALEXKA1 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

thanks is fixed my problem

@coreybutler
Copy link
Owner

Spaces are now supported in https://github.com/coreybutler/nvm-windows/releases/tag/1.1.8

@KonradLinkowski
Copy link
Author

Finally 🌟 , thank you very much 😄

@SURUCHIWALIA12
Copy link

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. (ALEXKA1 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\ALEXKA1\AppData\Roaming\nvm

worked well for me.

@Arjuncse07
Copy link

Facing the same issue

@vaishalparikh
Copy link

@savjisuyash-code Real big thank you for the solution !

@qyaaaa
Copy link

qyaaaa commented Mar 3, 2023

Still broken as of Mar/2023.

@davec-fvr
Copy link

davec-fvr commented Mar 24, 2023

Still having this issue in 1.1.10
Following the steps earlier in the thread does solve the issue

@tyhuynh03
Copy link

Thank it really solved the issue!!

@bhati00
Copy link

bhati00 commented Apr 29, 2023

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. (ALEXKA1 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\ALEXKA1\AppData\Roaming\nvm

@alexkar13 , thx man , you saved my day .

@cieko
Copy link

cieko commented May 29, 2023

Thanks , this helped me achieving it.

@galahzhenya
Copy link

Still have issue in nvm v1.1.10.

@waseber
Copy link

waseber commented Aug 11, 2023

Important information for the short name solution: dir /x does not work in Power Shell, it NEEDS to be in the simple command prompt.

@kriyanshishah
Copy link

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"

This worked.
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests