Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error EPIPE #68

Open
jellohouse opened this issue Jun 3, 2020 · 1 comment
Open

Error EPIPE #68

jellohouse opened this issue Jun 3, 2020 · 1 comment

Comments

@jellohouse
Copy link

jellohouse commented Jun 3, 2020

I'm getting this error using imageminPngquant:
errno: 'EPIPE', code: 'EPIPE', syscall: 'write', originalMessage: 'write EPIPE', shortMessage: 'Command failed with EPIPE:

And my code looks simply like this:

const imagemin = require('imagemin');
const imageminPngquant = require('imagemin-pngquant');
...
imagemin([filePath], {
      destination: path.join('images/build'),
      plugins: [
        imageminPngquant()
      ]
    })
    .then(files => {
      console.log(files);
    })
    .catch(err => {
      console.log("Error compressing", err);
    });

If I remove the imageminPngquant and leave the plugins section empty, the images do go to the destination properly but without any compression.

What could cause this issue? Any help would be greatly appreciated!

@jellohouse jellohouse changed the title Error to write image EPIPE Error EPIPE Jun 8, 2020
@gnitnuj
Copy link

gnitnuj commented Feb 6, 2021

Try checking your memory and/or timeout settings for your Lambda. I was able to resolve the intermittent EPIPE errors I was seeing after increasing both. It is likely due to insufficient memory, but I'm mentioning both just in case. Also for reference I was running Node 12 & I had the ImageMagick layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants