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.

end event never called ?

See original GitHub issue

Hello,

First, thanks to all contributors for this awesome project.

I’m trying to understand why the callback never gets called in the following example:

var gulp = require('gulp');
gulp.task('mytask', function(cb) {

  callSomeAsyncFunction(function() {

    gulp.src(['./somefile.js'])
      .on('end', cb); // cb never called

  });

});

Here is the output

➜  gulp mytask
[22:08:25] Using gulpfile ~/project/Gulpfile.js
[22:08:25] Starting 'mytask'...
➜ 

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
callumacraecommented, Apr 27, 2015

Check out readable.resume() and surrounding docs: this has bitten me before, too!

0reactions
adrienkohlbeckercommented, Apr 27, 2015

Thanks both of you! I’ll check it out

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js HTTP: request 'end' event is never called
I have a client that is sending data chunks to my node.js server. I want to listen on the "end" event and retrieve...
Read more >
http request 'end' event not fired #21398 - nodejs/node
Hi,. I am using the http request and breakdown the response times using events emitted at different stages of the request/response process.
Read more >
The event loop - JavaScript - MDN Web Docs - Mozilla
JavaScript has a runtime model based on an event loop, ... meaning that the callback is not called immediately after 500 milliseconds.
Read more >
Process | Node.js v19.3.0 Documentation
The 'beforeExit' event is not emitted for conditions causing explicit termination, such as calling process.exit() or uncaught exceptions.
Read more >
Simple test node, close event never called? - General
I created a simple node example, just to test input and close events. The close event never seems to fire? Did I do...
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