Gulp with Laravel Elixir throws events.js: 141 unhandled event 'error'

Since yesterday, gulp throws an unhandled error event:

"C:\Program Files (x86)\JetBrains\PhpStorm 10.0.1\bin\runnerw.exe" "C:\Program >Files\nodejs\node.exe" C:\..\..\..\..\..\node_modules\gulp\bin\gulp.js --color -->gulpfile "d:\..\..\..\gulpfile.js" default [11:41:02] Using gulpfile d:\..\..\..\gulpfile.js [11:41:02] Starting 'default'... [11:41:02] Starting 'sass'... Fetching Sass Source Files... - resources\assets\sass\app.scss Saving To... - public\css\app.css [11:41:02] Finished 'default' after 323 ms events.js:141 throw er; // Unhandled 'error' event ^ Error: no writecb in Transform class at afterTransform (d:\..\..\..\node_modules\gulp-autoprefixer\node_modules\readable->stream\lib\_stream_transform.js:95:33) at Immediate.TransformState.afterTransform (d:\..\..\..\node_modules\gulp->autoprefixer\node_modules\readable-stream\lib\_stream_transform.js:79:12) at Immediate.immediate._onImmediate (timers.js:435:18) at processImmediate [as _immediateCallback] (timers.js:383:17) 

I already uninstalled all my node_modules and installed them again.

Does anyone else have this problem?

Versions:

  • Laravel Framework version 5.1.24 (LTS)
  • Node: 4.2.2
  • npm: 3.5.1
  • gulp: 3.90
+7
php laravel laravel-elixir gulp
source share
1 answer

Having seen that you are using "Laravel", I can assume that you are using "laravel-elixir". Recent changes to this package have SASS compatibility issues.

You can always use the fixed version in the package.json file and set it to

  "dependencies": { "laravel-elixir": "3.4.2", } 

instead of the default ^ 3.0.0, it will automatically upgrade to the latest version. After changing the version, just run npm update

Hope this helps you.

+8
source share

All Articles