0

I have the following gulpfile.js, which I'm executing via the command line "gulp":

 var conf = require('./config.json');
var gulp = require('gulp');
var pug = require('gulp-pug');
//var watch = require('gulp-watch');

function pug(){
    return gulp.src(conf.src.pug + '/*.pug')
        .pipe(pug({
            pretty: true
        }))
        .pipe(gulp.dest(conf.dest.html));
};
function watch(){
    gulp.watch("*.pug", pug);
}
exports.watch = watch;

gulp.task('default',pug);

I'm getting the following error message:

PS C:\intt> gulp
[15:19:35] Using gulpfile C:\intt\gulpfile.js
[15:19:35] Starting 'default'...
[15:19:35] The following tasks did not complete: default
[15:19:35] Did you forget to signal async completion?
PS C:\intt>
bala
  • 1
  • What is your question? – common sense Dec 06 '18 at 10:11
  • How to solve the above error The following tasks did not complete: default Did you forget to signal async completion? – bala Dec 06 '18 at 10:55
  • You text is not a question but a description of what you have done in code and the result of it. Please [take the tour](https://stackoverflow.com/tour) an read [What topics can I ask about](https://stackoverflow.com/help/on-topic) and [What topics to avoid](https://stackoverflow.com/help/dont-ask) and [How to ask a good question](https://stackoverflow.com/help/how-to-ask) and [the perfect question](https://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) and how to create a [Minimal, Complete and Verifiable Example](https://stackoverflow.com/help/mcve). – common sense Dec 06 '18 at 13:35

1 Answers1

0

You have to change the code like below

exports.pug = pug;

gulp.task('default',pug);

hope this will helps ..!

DeC
  • 2,226
  • 22
  • 42