Could not load the "sharp" module using the linux-arm64 runtime
Trying to use a library that uses sharp inside a convex action and get this error. Using
bun
pkg manager. Any thoughts from anyone?4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
I’ve tried it with npm before and it works but i believe u have to use the node runtime and u have to externalise the module
node runtime
https://docs.convex.dev/functions/runtimes
externalise
https://docs.convex.dev/functions/bundling#external-packages
Runtimes | Convex Developer Hub
Convex functions can run in two runtimes:
Bundling | Convex Developer Hub
Bundling is the process of gathering, optimizing and transpiling the JS/TS
Yeah try this with the node runtime and "externalizing" the package with a convex.config like
if that doesn't work would be curious to hear, we know it works with npm and pnpm but it's possible there's more work to do for bun.
Yep love this! 👌 works like a charm. Works fine with
bun