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

Command failed due to space in file path #470

Closed
lukasrakauskas opened this issue May 7, 2015 · 7 comments
Closed

Command failed due to space in file path #470

lukasrakauskas opened this issue May 7, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@lukasrakauskas
Copy link

The error occurs with most of the commands.

Command failed: C:\Windows\system32\cmd.exe /s /c "c:\Users\Lukas Rakauskas\AppD
ata\Roaming\npm\node_modules\nativescript\lib\common\resources\platform-tools\an
droid\win32\adb start-server"
'c:\Users\Lukas' is not recognized as an internal or external command,
operable program or batch file.
@RangerMauve
Copy link

It's happening because you have a space in your windows username. Not sure how it'd be fixed though 😮

@teobugslayer
Copy link
Contributor

Hi @Lukosenka,

we have reproduced the issue on our side and will fix it in one of our next public releases.

@lukasrakauskas
Copy link
Author

Thank you very much, can't wait to start app developing. 👍

@rosen-vladimirov
Copy link
Contributor

Hi @Lukosenka,
As a workaround you may install Android SDK and add it to your PATH environment variable. This way we'll not call adb from nativescript-cli resources and everything should work fine.
I'm reopening this issue and I'll take care to close it once we have permanent fix for it in our code.
Hope this helps.

@saadeez
Copy link

saadeez commented Jun 13, 2015

This issue is still exist. As I'm learning the Nativescript's Hello World but in 2nd step I stucked in "tns platform add android" it gives me the same error even I have set environmental variable for Android SDk but still getting this error dont know why?

@rosen-vladimirov rosen-vladimirov added this to the 1.2.0 milestone Jun 16, 2015
@rosen-vladimirov rosen-vladimirov self-assigned this Jun 16, 2015
@teobugslayer
Copy link
Contributor

Hello @saadeez, please run tns platform add --log trace > log.txt and send us the log.txt file (you can create a Gist, for example)

@Fatme Fatme modified the milestones: 1.2.1, 1.2.0, 1.2.2 Jul 21, 2015
@teobugslayer teobugslayer changed the title Command failed Command failed due to space in file path Jul 27, 2015
rosen-vladimirov added a commit to telerik/mobile-cli-lib that referenced this issue Jul 27, 2015
When CLI is installed in directory, which has space (or the path above this dir has spaces) and android-sdk is not installed, we are trying to execute adb from our resources. This is failing due to missing `"` in our commands.

Fixes NativeScript/nativescript-cli#470
rosen-vladimirov added a commit that referenced this issue Jul 27, 2015
When CLI is installed in directory, which has space (or the path above this dir has spaces) and android-sdk is not installed, we are trying to execute adb from our resources. This is failing due to missing `"` in our commands.

Fixes #470
rosen-vladimirov added a commit that referenced this issue Jul 27, 2015
When CLI is installed in directory, which has space (or the path above this dir has spaces) and android-sdk is not installed, we are trying to execute adb from our resources. This is failing due to missing `"` in our commands.

Fixes #470
@rosen-vladimirov
Copy link
Contributor

The steps to reproduce this issue are:

  1. Remove path to android-sdk from your PATH environment variable.
  2. Install CLI locally in directory which has spaces in its name.
  3. Try executing tns device android command (make sure that when you write adb in your terminal, you get output like: "command not found")

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

No branches or pull requests

7 participants