Hi Vercel team,
I am using the Bun runtime for a Vercel Function and I need to use the recently introduced Bun.Image API.
The same code works correctly in my local environment, but it fails in production with this error:
TypeError: undefined is not a constructor
at ev1 (/var/task/apps/server/dist/bundle.js:1325:153865)
The failure happens when the application attempts to instantiate Bun.Image.
I added runtime diagnostics inside the deployed Vercel Function and received the following result:
{
"bunVersion": "1.3.12",
"bunRevision": "700fc117a2fd01ac0201deaa6fa69c5557acb04f",
"hasBunImage": "undefined",
"runtime": "bun"
}
This confirms that the production Function is currently running Bun 1.3.12, where Bun.Image is not available.
My questions are:
- Is there currently any way to pin or request Bun
1.3.14or a newer version for a Vercel Function? - Will
Bun.Imagebe supported in the Vercel Bun runtime once the runtime is updated, or could it be excluded from Vercel’s Bun build? - Is there any recommended temporary solution that does not require adding
sharpand its native binaries?
Thank you.