This gave me some iOS headaches, so I tried to update xcode. Of course, this meant that I had to stop putting off my upgrade to Yosemite.
So for good measure, I upgraded my CLI and am now using Ionic v1.0.0-rc.5.
after all of these installs, I run ionic build android and it yields
running cordova build android
Running command: /project/hooks/after_prepare/010_add_platform_class.js /project
add to body class: platform-android
Running command: /project/platforms/android/cordova/build
events.js:72
throw er; // Unhandled ‘error’ event
^
Error: spawn EACCES
at errnoException (child_process.js:998:11)
at Process.ChildProcess._handle.onexit (child_process.js:789:34)
ERROR building one of the platforms: Error: /project/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /project/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/share/npm/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)
I don't expect anyone to be able to recreate since it is clearly a machine-specific thing, but any/all suggestions are very much appreciated.
thanks for the response @ashteya. Unfortunately for me, that’s not it. You can see in the console output that I get past the hooks but fail somewhere in the build command.
I opened the build file and added a bunch of console.log statements to see if I could debug it, but I’m a little lost in the node world and had no luck.
thank you for the suggestion @bmwilson74, but the file is already 755, and I am confident that it is running because I edited the script by putting in a bunch of console.log statements which did print to the stdout. super frustrating.
I know this is outside the scope of ionic at this point, but if anyone has any suggestions, I am all-ears.
as an aside, I saw that ionic cli had an update today. I execute the npm statement to update it, but it errored-out, so I sudo ran it, and it succeeded. does that give any clues?
Thanks for the suggestions everyone. I finally got things working by sudo uninstalling cordova, and then non-sudo installing it again. It took several tries to install (npm issues, I guess), and I had to upgrade my android sdk, but android is building once again