C
C
coderxx2019-01-14 13:01:22
gulp.js
coderxx, 2019-01-14 13:01:22

Why doesn't the gulp-file-include plugin work?

Installed the gulp-file-include plugin.
gulpfile.js config:

gulp.task('fileinclude', function() {
  gulp.src(['app/index.html'])
    .pipe(fileinclude({
      prefix: '@@',
      basepath: '@file',
    }))
    .pipe(gulp.dest('./'));
});

When executed, it gives an error: Did you forget to signal async completion?
What could be the problem, how to fix it?
npm 6.4.1
gulp 4.0.0

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim Kot, 2019-01-15
@coderxx

There are thousands of questions with this error all over the Internet and moreover with a solution
Read the documentation https://gulpjs.com/docs/en/getting-started/async-c... before using the tool

gulp.task('fileinclude', function() {
  return gulp.src(['app/index.html'])
    .pipe(fileinclude({
      prefix: '@@',
      basepath: '@file',
    }))
    .pipe(gulp.dest('./'));
});

E
Egor Zhivagin, 2019-01-14
@Krasnodar_etc

On stackover, there seems to be an analysis of this problem - here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question