Answer the question
In order to leave comments, you need to log in
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
function done(cb) {
console.log("Finished");
cb();
}
gulp.task('default', gulp.series(gulp.parallel('a', 'b', 'c', 'd'), done));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question