A
A
Andrey Pushkin2018-07-15 15:32:07
JavaScript
Andrey Pushkin, 2018-07-15 15:32:07

TypeError: dest.on is not a function, how to fix in gulp?

I am writing tasks for compiling the layout, and I can’t set up the autoprexifier, an error pops up from the question title.
Task code:

gulp.task('autoprexifier',() => {
  gulp.src('maket/sass/style.css')
    .pipe(autoprexifier({
      browsers: ['last 2 versions']
    }))
    .pipe(gulp.dest('build/'))
});

Console code:
TypeError: dest.on is not a function
    at DestroyableTransform.Readable.pipe (C:\Users\User\Desktop\geekbrains\html5-css3\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:516:8)
    at Gulp.gulp.task (C:\Users\User\Desktop\geekbrains\html5-css3\gulpfile.js:37:5)
    at module.exports (C:\Users\User\Desktop\geekbrains\html5-css3\node_modules\orchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (C:\Users\User\Desktop\geekbrains\html5-css3\node_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (C:\Users\User\Desktop\geekbrains\html5-css3\node_modules\orchestrator\index.js:214:10)
    at Gulp.Orchestrator.start (C:\Users\User\Desktop\geekbrains\html5-css3\node_modules\orchestrator\index.js:134:8)
    at C:\Users\User\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned\^3.7.0\index.js:72:20
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question