nodejs-aws-lambda-image-resizer icon indicating copy to clipboard operation
nodejs-aws-lambda-image-resizer copied to clipboard

Cannot find module '../build/Release/sharp-linux-x64.node'

Open piotrkulpinski opened this issue 3 years ago • 1 comments

Hi , Thank you for this great tutorial! I've run into some issue with Sharp library.

The CloudWatch is returning the following error:

Something went wrong installing the "sharp" module

Cannot find module '../build/Release/sharp-linux-x64.node'
Require stack:
- /var/task/node_modules/sharp/lib/sharp.js
- /var/task/node_modules/sharp/lib/constructor.js
- /var/task/node_modules/sharp/lib/index.js
- /var/task/index.js
- /var/runtime/UserFunction.js
- /var/runtime/index.js

Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install 

Do you know what can I do to get rid of it?

Thanks!

piotrkulpinski avatar Sep 21 '22 14:09 piotrkulpinski

I found the solution here. I hope this helps you.

hhoangg avatar Mar 08 '23 05:03 hhoangg