I'm trying to use sharp package and get this error when running bunx convex dev
I've tried sharp versions: 0.33.5 and latest, 0.34.4, same result every time.
I've configured convex.json in root directory (same as package.json) as:
{
"$schema": "https://raw.githubusercontent.com/get-convex/convex-backend/refs/heads/main/npm-packages/convex/schemas/convex.schema.json",
"node": {
"nodeVersion": "22",
"externalPackages": ["sharp"]
}
}
All related files/actions have "use node" directive.
Output of bunx convex dev --once --debug-node-apis:
✔ Provisioned a dev deployment and saved its name as CONVEX_DEPLOYMENT to .env.local
Write your Convex functions in convex/
Give us feedback at https://convex.dev/community or [email protected]
View the Convex dashboard at https://dashboard.convex.dev/d/{project}
Bundling convex entry points one at a time to track down things that can't be bundled for the Convex JS runtime.
A patch update is available for Convex (1.27.1 → 1.27.3)
Changelog: https://github.com/get-convex/convex-js/blob/main/CHANGELOG.md#changelog
✔ All non-'use node' entry points successfully bundled. Skipping rest of push.
✔ 19:34:25 Convex functions ready! (16.24s)
Versions:
convex: 1.27.1
sharp: 0.33.5 | 0.34.4
bun: 1.2.21