question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

events.js:160 - throw er; // Unhandled 'error' event

See original GitHub issue

OS: Winsdows Pro 10 Node: 6.1.0 NPM: 3.8.6

Steps to reproduce

gulp deploy-firebase

Expected Behavior

Deploy firebase app

Actual Behavior

{lamb} gulp deploy-firebase
[01:46:00] Requiring external module babel-register
[01:46:04] Using gulpfile ~\Documents\Visual Studio 2015\Projects\este-MyReactApp\gulpfile.babel.js
[01:46:04] Starting 'to-html'...
[01:46:04] Starting 'eslint-ci'...
The react/require-extension rule is deprecated. Please use the import/extensions rule from eslint-plugin-import instead.
[01:46:26] Finished 'eslint-ci' after 22 s
[01:46:26] Starting 'ava'...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm ENOENT
    at exports._errnoException (util.js:949:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

...\Documents\Cmder/vendor/clink-completions/npm_prompt.lua:11: attempt to concatenate local 'packague)ersion' (a nil valC:\Users\Theo\Documents\Visual Studio 2015\Projects\este-MyReactApp {git}{hg}

In /build, no 404.html, index.html, or /assets is built

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
TheoMercommented, Sep 13, 2016

@steida Just to let you know that this particular issue still existed, regardless of your claim that it worked perfectly for you, until I changed every instance of:

import { spawn } from 'child_process';

to

import spawn from 'cross-spawn';

in to-html.js, flow.js, deploy-firebase.js, and ava.js in /gulp. And, in flow.js, deploy-firebase.js, and ava.js, every instance of:

  childProcess
    .spawn('npm', ['run', 'flow'], { stdio: 'inherit' })
    .on('close', done);

was changed to:

spawn('npm', ['run', 'flow'], { stdio: 'inherit' })
.on('close', done);
1reaction
steidacommented, Sep 10, 2016

Correct. No, I can’t take a look. I do not use Windows and having tons of the other things to do, sorry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

events.js:160 throw er; // Unhandled 'error' event
Recently I updated the node version to v6.3.1. Then something came wrong. A task named 'html' throws an error. Here is the part...
Read more >
events.js:160 throw er; // Unhandled 'error' event #401 - GitHub
This will provide source maps and a much more useful stack trace. events.js:160 throw er; // Unhandled 'error' event ^. Error: listen EADDRINUSE...
Read more >
Getting this error. events.js:160 throw er - Treehouse
Getting this error. events.js:160 throw er; // Unhandled 'error' event. I am getting the following error and can't work out why.
Read more >
[SOLVED] events.js:160 throw er; // Unhandled 'error' event
In a recent Laravel project I came across this rather annoying error: events.js:160 throw er; // Unhandled 'error' event. The solution:.
Read more >
How to Fix "throw er; // Unhandled 'error' event"?
npm run watch fails with a rather cryptic "throw er; // Unhandled 'error' event". Here is how I resolved it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found