Open MarkLyck opened 1 week ago
I cannot reproduce the error... When running this repo: (https://github.com/rajput-hemant/nextjs-template) on Vercel it works with the commands bun install and bun run build. Also Vercel is defaulting my bun version to 1.1.16.
What version of Bun is running?
1.1.12+43f0913c3
What platform is your computer?
My computer where it works:
Darwin 23.5.0 arm64 arm
Vercel: (where the error appears). I'm not sure
What steps can reproduce the bug?
When deploying my nextJS app to Vercel using bun to install and build. I get the following error:
However I can install and build this fine on my old machine. Both Vercel and my machine is using
bun version 1.1.12
Switching my package manage to
pnpm
and installing the same project withpnpm i
andpnpm run build
fixes the issue and it builds without any problem on Vercel.It seems like there's an import bug with bun 1.1.12 and possibly still 1.1.15 when running in a Vercel Linux environment.
I have checked the
cookie@0.6.0
package that's installed in my node_modules, and it looks fine. The exports exist and bun seems to be wrong.I have tried to use
resolutions
to force the package to0.6.0
but that did nothing.To reproduce, set up
next-auth@5
in any nextjs project and attempt to deploy it to Vercel.next-auth@5
uses the@auth/core
package which relies on thecookie
package where it importsparse
andserialize
like this:running npm list it shows there's no other things in my project using
cookie
.Seems to be a bug in
bun
since it works when doing nothing other than switching the install / build topnpm
What is the expected behavior?
The project should install and build without errors like it does with
pnpm
ornpm
.What do you see instead?
Error above.
Additional information
No response