jonkemp / gulp-useref

Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
MIT License
705 stars 93 forks source link

G4 error, Did you forget to signal async completion? #252

Open azerafati opened 6 years ago

azerafati commented 6 years ago

I just switched to Gulp version 4, everything works fine except my useref task giving me error:

The following tasks did not complete:  dependencies-admin
 Did you forget to signal async completion?

If I remove the useref pipe it works perfectly fine

gulp.task('dependencies-admin', function (done) {

    return gulp.src(['app/view/admin/admin-index.php'], {base: '.'})

        .pipe(useref({searchPath: '.'}))    // if I comment this line  the error goes away

        .pipe(gulp.dest(destination));

});

for some reason useref is not signalling the end of it's task? have you tested it with G4? Am I missing something here?

jonkemp commented 6 years ago

I think you either need to call done or don't pass it in. What happens if you try that?