B
B
Bogdan2017-05-06 22:45:26
JavaScript
Bogdan, 2017-05-06 22:45:26

Gulp 4 and gulp-stylefmt error on watch?

When running in Gulp 4, there is an error with watch, tell me how to solve this problem, thanks!

gulp = require 'gulp'
stylefmt = require 'gulp-stylefmt'

tstylefmt = ->
  gulp.src 'sass/**/*.scss'
    .pipe stylefmt( )
    .pipe gulp.dest 'sass/**/*.scss'

twatch = ->
  gulp.watch paths.sass, tstylefmt

watch = gulp.series tstylefmt, twatch

gulp.task 'default', watch

(node:12060) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: this.emit is not a function
(node:12060) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate
the Node.js process with a non-zero exit code.

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