imagemin / imagemin-jpegtran

jpegtran plugin for imagemin
MIT License
119 stars 27 forks source link

imagemin-jpegtran broken pipe #8

Closed oscarmcm closed 9 years ago

oscarmcm commented 9 years ago

Note:

This is my gulp task:

// Optimize Images
gulp.task('images', function () {
  return gulp.src('app/images/**/*')
    .pipe($.cache($.imagemin({
      progressive: true,
      interlaced: true
    })))
    .pipe(gulp.dest('dist/images'))
    .pipe($.size({title: 'images'}));
});

And this is my stack trace:

Unhandled rejection Error: Error: write EPIPE
    at ChildProcess.<anonymous> (/Users/oscarmcm/Code/html/sHyrax/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-jpegtran/index.js:60:11)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)
mrnix commented 9 years ago

+1. It happens with some images, I can't recognize the reason

oscarmcm commented 9 years ago

It's seem a bug with only jpeg images

mrnix commented 9 years ago

Now I'm using imagemin-mozjpeg plugin instead, it works without errors

shinnn commented 9 years ago

I just edited the markup of @oscarmcm's comment. https://github.com/imagemin/imagemin-jpegtran/issues/8#issue-103310470

Correct markdown syntax highlighting helps the maintainers read your code.

shinnn commented 9 years ago

@oscarmcm @mrnix Can you create a small repository that can reproduce the problem?

shinnn commented 9 years ago

https://github.com/sindresorhus/gulp-imagemin/issues/142#issue-110802779

pizzeria

The console error output states: events.js:85 throw er; //Unhandled 'error' event

Error: Error: write EOF at ChildProcess. (FILEPATH\imagemin-jpegtran\index.js:60:11) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Socket. (child_process.js:1183:11) at Socket.emit (events.js:107:17) at Pipe.close (net.js:485:12)

oscarmcm commented 9 years ago

:+1: thanks @shinnn

dmullings81 commented 8 years ago

I have a similar issue to the one above. I opened the issue in imagemin here Many thanks.

shinnn commented 8 years ago
dmullings81 commented 8 years ago

Windows Vista SP2 (I know) Node 4.3.0 NPM 2.14.12 imagemin 2.4.0 imagemin-jpegtran ^4.3.2

shinnn commented 8 years ago

imagemin 2.4.0

Really ancient version. Upgrade to the latest imagemin and try again.

dmullings81 commented 8 years ago

Thanks, that's solved it. No idea why it was such an old version.

shinnn commented 8 years ago

@dmullings81 No problem.