Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Since yesterday, gulp throws 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 deleted all my node_modules and installed them back again with no luck.

Anyone else having this problem?

Versions:

  • Laravel Framework version 5.1.24 (LTS)
  • Node: 4.2.2
  • npm: 3.5.1
  • gulp: 3.90
like image 820
yclaes Avatar asked Nov 27 '15 11:11

yclaes


1 Answers

Seeing you're using 'Laravel' I can only assume you're using 'laravel-elixir'. Due to recent changes in this package there are some compatibility problems with SASS.

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

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

instead of the default ^3.0.0, witch will auto update to the latest version. After changing the version just re-run npm update

I hope this helps you.

like image 173
Frederiek Avatar answered Oct 23 '22 19:10

Frederiek