-
Notifications
You must be signed in to change notification settings - Fork 134
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
Could not load the \"sharp\" module using the linux-x64 runtime\nPossible #40
Comments
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: |
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 |
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"
The text was updated successfully, but these errors were encountered: