Gulpjs 4: Error during looping

I’m trying to loop over all the Outputs, but i get this Error The following tasks did not complete: style Did you forget to signal async completion?

I even didn’t really understand the Error.

const gulp = require('gulp');
const sass = require('gulp-sass');

const outputsSass = [
  '',
  'admin/',
  'admin/pages/',
  'website/',
  'website/pages/',
];

function style() {
  outputsSass.forEach(output => gulp
    .src(`sass/${output}*.scss'`)
    .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest(`public/css/${output}`)));
}
exports.style = style;

Hi refatalsakka welcome to the forum

I’m far from being a gulp expert, but are you sure this syntax is correct?

.src(`sass/${output}*.scss'`) 
1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.