question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serverless and Imagemin

See original GitHub issue

This is a Bug Report

Description

Hi there,

I am trying to use imagemin in a function (Nodejs). It is working fine on local, but once it is deployed, I am getting this error if I try it, and the lambda function crash.

"code": 126,
    "killed": false,
    "stdout": "",
    "stderr": "/var/task/node_modules/guetzli/vendor/guetzli: /var/task/node_modules/guetzli/vendor/guetzli: cannot execute binary file\n",
    "failed": true,
    "signal": null,
    "cmd": "/var/task/node_modules/guetzli/vendor/guetzli --quality 90 /tmp/f67f3a83-0132-4320-a56b-f03cbdd87edc /tmp/3a639aee-827c-45f1-b407-83ce15ce5632",
    "timedOut": false

(It happens with every plugins, mozjpeg, png…)

Maybe I am missing something, a file to deploy, or a configuration ? I didnot know if it was a issue of imagemin or serverless (or both)

Thanking you in advance

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
HyperBraincommented, Jun 7, 2017

Just started looking into it

1reaction
tgensolcommented, Jun 2, 2017

Hi,

@pmuens I am using Mac Os (10.12)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optimize images on S3 with AWS Lambda and Serverless
An image is uploaded on S3, that triggers a lambda that optimize that image and put it back. How hard can that be?...
Read more >
Developers - Serverless and Imagemin - - Bountysource
Coming soon: A brand new website interface for an even better experience!
Read more >
Building an image resizer/optimizer with Lambda and S3
Step 1: Install the Serverless framework and create a new service ... const imageminPngquant = require('imagemin-pngquant');const s3 = new ...
Read more >
imagemin plugin throwing ENOENT error on aws lambda
Run "Serverless Deploy" to deploy your project. That's it. Took me around 20min to perform this solution while the others, even though some ......
Read more >
@innovorder/serverless-resize-bucket-images - npm
Dependencies (9) · @google-cloud/functions-framework · @google-cloud/storage · dotenv · gm · imagemin · imagemin-jpegtran · imagemin-optipng · mime-types ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found