U
U
User3332021-06-03 18:22:10
gulp.js
User333, 2021-06-03 18:22:10

When running the gulp4 command, it gives the error Did you forget to signal async completion?

Hello. When I run the gulp fontsStyle command, it gives the following

. The following tasks did not complete: fontsStyle [19:16:20] Did you forget to signal async completion? Here is the gallpfile function fontsStyle(params) { let file_content = fs.readFileSync('app/scss/_fonts.scss'); if (file_content == '') { fs.writeFile('app/scss/_fonts.scss', '', cb); return fs.readdir('dist/fonts/', function (err, items) { if (items) { let c_fontname; for (var i = 0; i < items.length; i++) { let fontname = items[i] .


fontname = fontname[0];
if (c_fontname != fontname) {
fs.appendFile('app/scss/_fonts.scss', '@include font("' + fontname + '", "' + fontname + '", "400", "normal" );\r\n', cb);
}
c_fontname = fontname;
}
}
})
}
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasya Bulka, 2021-06-03
@Anonymous24

function done(cb) {
    console.log("Finished");
    cb();
}

gulp.task('default', gulp.series(gulp.parallel('a', 'b', 'c', 'd'), done));

https://gulpjs.com/docs/en/getting-started/async-c...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question