ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: Unhandled 'error' event (events.js:72)

Open quicoli opened this issue 12 years ago • 14 comments

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

quicoli avatar Aug 07 '14 19:08 quicoli

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

Arkh1 avatar Aug 07 '14 19:08 Arkh1

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).

jawinn avatar Aug 07 '14 21:08 jawinn

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]

gabrielmuresan avatar Aug 08 '14 13:08 gabrielmuresan

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)

silvrbak avatar Aug 31 '14 02:08 silvrbak

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 ''

gabrielmuresan avatar Aug 31 '14 11:08 gabrielmuresan

Still getting the error. Thanks though.

silvrbak avatar Aug 31 '14 15:08 silvrbak

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.

silvrbak avatar Sep 01 '14 17:09 silvrbak

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 avatar Sep 04 '14 15:09 rhumbus

@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.

superpezgeek avatar Sep 05 '14 03:09 superpezgeek

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.

lnoir avatar Sep 06 '14 11:09 lnoir

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.

perrygovier avatar Sep 06 '14 15:09 perrygovier

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?

rhumbus avatar Sep 07 '14 22:09 rhumbus

Moving the discussion to the cli repo: https://github.com/driftyco/ionic-cli/issues/76

adamdbradley avatar Sep 08 '14 14:09 adamdbradley

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.

ionitron-bot[bot] avatar Sep 06 '18 14:09 ionitron-bot[bot]