bug: Unhandled 'error' event (events.js:72)
Type: bug
Platform: desktop browser
I'm trying to run:
ionic platform add android
in my project and I'm getting the following:
events.js: 72 throw er; // Unhandled 'error' event
Error: spawn ENOENT at errnoException (child_process.js:1000:11) at Process.ChildProcess._handle.onexit (child_processos.js:791:34)
My Ionic is updated. I just started a new project based on "tabs"... Everything is on Path as expected..
Windows 8.1
I seem to recall running into this same issue. iirc it started working after installing the android sdk and making sure it was in my environment variables.
http://developer.android.com/sdk/installing/index.html?pkg=tools http://developer.android.com/sdk/installing/adding-packages.html
I just started receiving this error after running npm update -g ionic.
It occurs when I use ionic run android. Using cordova run android works though.
Everything was working fine before; running, building. I tried running an npm update of all packages, as well as running the Android SDK Manager for any available updates. That didn't have an effect. I'm able to ionic serve and run the app via the browser (Windows 7).
the version 1.1.8 has some issues with this as many people seem to experience. try getting the version 1.1.7 or 1.1.9-beta1
for a list of ionic versions run
npm view ionic versions
for a working version try installing 1.1.7 or 1.1.9-beta1 with this command(s)
npm install -g [email protected]
or
npm install -g [email protected]
I am also getting this error after upgrading to ionic 1.1.12. Running 'ionic run' or 'ionic emulate' work fine. I am also on Windows 8.1. All environment variables are correct. Everything was fine until after the upgrade. I tried downgrading to 1.1.11 but that didn't work. 'ionic serve' gives this error,
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)
The 1.1.13 seems to be ok. I just tried it now and everything works as expected. Try that maybe it will fix your problem
'' npm install -g ionic ''
Still getting the error. Thanks though.
Did some more experimenting. I think I have steps to reproduce this issue. I created a new test app, 'ionic serve' works fine. I then ran 'ionic setup sass'. I believe this is what is causing 'ionic serve' to break. Did it multiple times.
Same issue here exactly.
After ionic setup sass it writes the above mentioned error and aborts.
Only setting sass in ionic.project to false overrides the problem, but leaves me without sass compilation.
@rhumbus I had the same issue. Turns out I didn't have gulp installed. npm install -g gulp fixed it for me. Hopefully that fixes it for you, too.
I was just getting the same error and the reason was also that gulp wasn't installed. npm install -g gulp fixed it for me too.
Last night we installed a big update to the CLI, after making sure gulp is updated, could you also update Ionic. Let me know if that helped.
Unfortunately the problem persists. I've update gulp, gulp-sass, gulp-minify-css, ionic CLI, bower, sass gems, project libs and basically any possible aspect of the module involved, global, and in project. I also tried to run a separate gulp watch process, but to no avail. I still get the same error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
Interestingly, now I'm also getting this error when running gulp sass:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: source string:18: error: error reading values after :
Error running gulp sass
I didn't change anything in the gulp file from what ionic created, just saying. It feels like I'm missing something. I checked this on 2 separate computers, with all packages installed on both. Is there any advanatge to working off an ionic repository, as instructed here?
Moving the discussion to the cli repo: https://github.com/driftyco/ionic-cli/issues/76
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.