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.

Gulp tasks finish but the process never exits.

See original GitHub issue

As of about two days ago, my gulp tasks are finishing but the process is not exiting. I’ve tried narrowing down what changed between before and now, but nothing I try can get me back to the original working behavior.

I first noticed this after upgrading to 3.8.11, but I’ve since downgraded and the problem persists. I tried on a different computer that had the same repo checked out and it worked fine. Then after running npm install and upgrading all packages, I get the same issue. Again, I’ve tried downgrading and attempting to get back to the working behavior, but I can’t seem to no matter what I try.

As a reduced test case, I created the following task:

gulp.task('noop', function() {});

I then ran gulp noop with the following output:

[16:57:46] Using gulpfile ~/Projects/solved-by-flexbox/gulpfile.js
[16:57:46] Starting 'noop'...
[16:57:46] Finished 'noop' after 41 μs

But the process never exits. Has anyone else experienced this?

I’m not sure if it matters, but I’m running iojs v1.2.0 and gulp v3.8.11. I’ve tried using node v0.10.29 and gulp v3.8.10 (which was working the other day), but it still doesn’t work.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
trochcommented, Apr 10, 2015

Just to let you know, I ran into a similar issue with nunjucks. If you are using nujucks.configure, make sure you add watch: false as an option.

nunjucks.configure('template', {watch: false});
1reaction
phatedcommented, Feb 14, 2015

Yep. The culprit is always a library that is keeping an extra handle open. I’ve run into this with database drivers and libraries that implement their own watching mechanisms. Glad you tracked it down.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gulp doesn't exit after running tasks - Stack Overflow
If you are running the default gulp task (by just running gulp at the command line with no arguments), then it doesn't return...
Read more >
Getting Started with Gulp.js - Semaphore Tutorial
Learn how to set up and use Gulp.js, a task runner for Node.js based on Node streams. We'll introduce main concepts of Gulp...
Read more >
Creating Tasks | gulp.js
Each gulp task is an asynchronous JavaScript function - a function that accepts an error-first callback or returns a stream, promise, event emitter, ......
Read more >
Gulp watch task never terminates, leads to VS hanging waiting ...
VS hangs, tells me it's busy, and is waiting for the node process to be terminated (without actually instructing it to terminate). I...
Read more >
[Solved]-Gulp task finishes but never ends-node.js
Related Query · gulp coffee watch never finishes on error · Gulp JS task never defined default · Can I run a Gulp...
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