Luis Martins
Luis Martins

Reputation: 89

EPIPE error uploading img to s3 using imagesquish

I've been testing imagesquish for a while and I can't seem to have it working.

It works with node.js, forever, express and knox and basically does image processing on the fly. I'm trying to call an image on a server, it resizes, crops or whatever and then uploads to s3.

I've had permission issues but after creating a new s3 bucket, it seems I made some progress but then, the image doesn't get uploaded and I can't get any error.

I managed to go through it's code and go all the way to exports.uploadImage that would call img.toBuffer but apparently it doesn't get called.

At the end, I get the error:

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: write EPIPE
at errnoException (net.js:904:11)
at Object.afterWrite (net.js:720:19)
error: Forever detected script exited with code: 8
error: Script restart attempt #1 

I need some help on this. Does anybody have any idea?

Upvotes: 1

Views: 594

Answers (1)

Dustin
Dustin

Reputation: 2211

Luis. Not sure if you're still interested in an answer to this. I'm the author of ImageSquish. From the information you provide, this sounds like img.toBuffer is failing which is usually because graphicsmagick is not installed. The latest version of ImageSquish checks for the existence of this library on startup (see https://github.com/dmcquay/imagesquish/blob/master/check.js).

You might also find it easier to try it out using docker (https://registry.hub.docker.com/u/dmcquay/imagesquish/) so you don't have to worry about installing anything.

If this doesn't resolve your problem, you can find me via irc on freenode #imagesquish.

Upvotes: 1

Related Questions