Closed eyyazubi closed 3 months ago
It did not work for me (i am using Mac)
I also use mac. I haven't tested it at all on the mac. It comes in Lambda functions on aws.
i had a "internal error" message, when i try visit to the images via cloudfront url and saw the error in the lambda functions under code source.
found this post regarding sharp and linux-x64 runtime: https://github.com/lovell/sharp/issues/4001
I had this error because I deployed without running the build before, after running the build it was working fine. I'm using node v22 and npm 10.6.0.
have the same problem, changed node version from 18 to 20,rebuild, now works fine
It did not work for me (i am using Mac)
I think u re using an arm machine so the binary for sharp are not created
This will work fine on x86 machines. To get around this use post build instead of prebuild in package.json
Like this and it will work fine. Lmk if it works out.
Switched to Node 20 from 18. Now it works. 🎉
i got:
"errorType": "Error", "errorMessage": "Could not load the \"sharp\" module using the linux-x64 runtime\nPossible solutions:\n- Ensure optional dependencies can be installed:\n npm install --include=optional sharp\n yarn add sharp --ignore-engines\n- Ensure your package manager supports multi-platform installation:\n See https://sharp.pixelplumbing.com/install#cross-platform\n- Add platform-specific dependencies:\n npm install --os=linux --cpu=x64 sharp\n- Consult the installation documentation:\n See https://sharp.pixelplumbing.com/install"...
and fixed with root package.json line 8: prev: "prebuild": "npm install sharp --prefix functions/image-processing/ --os=linux --cpu=x64"
TO: "prebuild": "npm install --force sharp --prefix functions/image-processing/ --os=linux --cpu=x64"