G4 - Did you forget to signal async completion?
See original GitHub issueHello, in the process of transitioning from G3 to G4 and I’ve ran into a snag with one of my tasks. I’ve tried a standard function and gulp.series()
with no luck. Both tasks bark out:
The following tasks did not complete: svg-2-png
[09:17:32] Did you forget to signal async completion?
Tasks:
function svg2png(done){
return gulp.src(appDefaults.imagesDir+"/*.svg")
.pipe(svg2png())
.pipe(gulp.dest(appDefaults.imagesDir+'/fallbacks'));
done();
}
gulp.task('svg2png', gulp.series(function(done){
gulp.src(appDefaults.imagesDir+"/*.svg")
.pipe(svg2png())
.pipe(gulp.dest(appDefaults.imagesDir+'/fallbacks'));
done();
}));
gulp.task('svg-2-png',svg2png);
I think this is going to be something documentation could help for folks like me moving from 3 to 4. I read blog posts about this but don’t see any reference to done(); in readme 😉
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Gulp error: The following tasks did not complete - Stack Overflow
HTTP Server Started [14:14:41] The following tasks did not complete: message [14:14:41] Did you forget to signal async completion? I'm using gulp 4...
Read more >Async Completion - gulp.js
No synchronous tasks When you see the "Did you forget to signal async completion?" warning, none of the techniques mentioned above were used....
Read more >How to fix: Gulp - tasks did not complete ... you forget to signal ...
Now your Gulp task should run without the tasks did not complete and you forget to signal async completion warning lines.
Read more >Почему gulp (v4) выдает "Did you forget to signal async ...
Почему gulp (v4) выдает «Did you forget to signal async completion?»? Всем привет! Gulpfile.js: 'use strict'; const gulp = require ...
Read more >Gulp error: Did you forget to signal async completion?
Gulp error: Did you forget to signal async completion? ... I had the following gulpfile.js : # file gulpfile.js function build() { return...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just return the stream, you don’t need to call the callback at all.
If you were doing something that didn’t have a stream, you can use the callback to signal done instead of returning a stream. You never do more than one.
@jackesdavid that is not the appropriate fix. Even if you improperly use those methods inside functions, you need to pass the
callbackA
to the invocation.