Can't "platform add" or "run android" after updating to1.0.0-beta.11

Hi,

I just updated ionic to the latest Version. Now there will be an error, every time i use “platform add android” or “run android” command.



C:\AndroidWorkspace\ionictest>ionic run android

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1000:11)
    at Process.ChildProcess._handle.onexit (child_process.js:791:34)

C:\AndroidWorkspace\ionictest>

Before the Update, everything works fine. “ionic serve” and “ionic start” are working.

regards
mav

2 Likes

I am encountering the same issue. 1.0.0-beta.11. Cordova apps are working fine, and have been for some time. However, any ionic platform cmds cause the following. I’ve printed some environment variables, just for completeness.

C:\Users\Jeff\eclipse-luna-workspace\cya-web\trunk\cyamobileionic>echo %ANDROID_HOME%
C:\Users\Jeff\Tools\adt-bundle\adt-bundle-windows-x86_64-20140702\sdk

C:\Users\Jeff\eclipse-luna-workspace\cya-web\trunk\cyamobileionic>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_11

C:\Users\Jeff\eclipse-luna-workspace\cya-web\trunk\cyamobileionic>echo %ANDROID_HOME%
C:\Users\Jeff\Tools\adt-bundle\adt-bundle-windows-x86_64-20140702\sdk

C:\Users\Jeff\eclipse-luna-workspace\cya-web\trunk\cyamobileionic>ionic platform add android

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

Hey guess, just checking, what version of the cli are you using? The latest version should be v1.1.8

$ sudo npm install -g ionic

There was a change in v1.1.8 to use spawn instead of exec, because we were having some async issues with exec: https://github.com/driftyco/ionic-cli/commit/fb7902a60e24dde30e25fea5d94e0dbe66a5f674#diff-f338e494c9ab9b27131937a14ab3c24eL38

I’ll have to dig into further, but looks like the child process isn’t able to find the cordova command.

I do have CLI version 1.1.8

C:\Users\Jeff\eclipse-luna-workspace\cya-web\trunk\cyamobileionic>ionic
  _             _
 (_)           (_)
  _  ___  _ __  _  ___
 | |/ _ \| '_ \| |/ __|
 | | (_) | | | | | (__
 |_|\___/|_| |_|_|\___|  CLI v1.1.8

Usage: ionic task args

Sorry for my English. But I too feel the same.

temporary solution
npm install -g ionic@1.1.7

2 Likes

thanks!!! you can’t imagine how do you just help me

I made some fixes, would you be able to give 1.1.9-beta1 a test?

npm install -g ionic@1.1.9-beta1

thanks

Nice, I just came looking for the answer to this issue. This 1.1.9-beta1 worked for me on Win 7.

I was having the same issue, and 1.1.9-beta1 seems to have fixed it. Thanks! :slight_smile:

Good morning,

1.1.8-beta1 works fine for me. Thanks alot.

Great framework
Great Team
Great Community

Have a nice day :sunny:

1 Like

I was about to give up, but Beta 1.1.9 worked for me too!

Yes. 1.1.9-beta1 works for me.

Glad to hear 1.1.9 worked