При запуске команды gulp4 выдает ошибку Did you forget to signal async completion?
Здравствуйте. Когда запускаю команду gulp fontsStyle, — выдает следующее..
[19:16:20] Using gulpfile ~\Desktop\hc\gulpfile.js
[19:16:20] Starting 'fontsStyle'...
[19:16:20] The following tasks did not complete: fontsStyle
[19:16:20] Did you forget to signal async completion?
Вот сам галпфайл
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].split('.');
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;
}
}
})
}
}