0

I'm working on a Vue.js project that uses Karma, Webpack, and AWS. Everything was working fine but suddenly I'm getting this error when I run "npm run build" after cloning the repo and doing "npm install".

This is my gulpfile.js:

const gulp = require('gulp');
const HubRegistry = require('gulp-hub');
const browserSync = require('browser-sync');

const conf = require('./conf/gulp.conf');

// Load some files into the registry
const hub = new HubRegistry([conf.path.tasks('*.js')]);

// Tell gulp to use the tasks just loaded
gulp.registry(hub);

gulp.task('build', gulp.series(gulp.parallel('other', 'webpack:dist')));
gulp.task('watch', watch);
gulp.task('test', gulp.series('karma:single-run'));
gulp.task('test:auto', gulp.series('karma:auto-run'));
gulp.task('serve', gulp.series('webpack:watch', 'watch', 'browsersync'));
gulp.task('serve:dist', gulp.series('default', 'browsersync:dist'));
gulp.task('default', gulp.series('clean', 'build'));

function reloadBrowserSync(cb) {
  browserSync.reload();
  cb();
}

function watch(done) {
  gulp.watch(conf.path.tmp('index.html'), reloadBrowserSync);
  done();
}

This is the error:

'webpack:dist' errored after 118 ms
 ....
'build' errored after 120 ms
'default' errored after 136 ms
 The following tasks did not complete: other
 Did you forget to signal async completion?

Not sure why suddenly everything broke?

  • where have you define `other` task ? Define task named `other`. – Mukesh Sharma Dec 07 '16 at 05:36
  • I've never defined other, that's what is partially confusing. All my tasks are the ones in that gulpfile.js – Tanha Kabir Dec 07 '16 at 05:42
  • `gulp.parallel('other', 'webpack:dist')` means that you want to run task `other` and `webpack:dist` parallely. – Mukesh Sharma Dec 07 '16 at 05:48
  • oh! found it! sorry I set this project up with a generator so not fully sure of the set up. `function other() { const fileFilter = filter(file => file.stat.isFile()); return gulp.src([ path.join(conf.paths.src, '/**/*'), path.join(`!${conf.paths.src}`, '/**/*.{scss,js,html}') ]) .pipe(fileFilter) .pipe(gulp.dest(conf.paths.dist)); }` – Tanha Kabir Dec 07 '16 at 05:52
  • 1
    Possible duplicate of [Gulp error: The following tasks did not complete: Did you forget to signal async completion?](http://stackoverflow.com/questions/36897877/gulp-error-the-following-tasks-did-not-complete-did-you-forget-to-signal-async) – Sven Schoenung Dec 07 '16 at 06:15
  • What's puzzling me is that I haven't touched any of the gulp code since creating the project a month ago but now suddenly it's breaking. Adding dependencies shouldn't modify the gulp tasks right? – Tanha Kabir Dec 07 '16 at 06:53

0 Answers0