Build errors next js 14 server actions vercel
I created a fresh t3 repo with tailwind, next auth, drizzle and app router. Bumped up next.js and react versions to latest as stated here https://nextjs.org/docs/pages/building-your-application/upgrading/version-14. Build work fine locally, fails on vercel. Tried setting serverActions key in next config to something - the same build output on vercel.
Attaching package.json, next config, local build output, error screenshot and serverActions key shape.
24 Replies
ah, instead of using next 'latest' expliciatly use the latest version
Oh, I tried that too
Forgot to mention
regardless if that didnt work, keep it explicitly set, not 'latest'
I know dude, thank you for advice
can you link the repo?
Oh, and I am using bun as package manager
It is private repo
For a client
try switching to pnpm and see if its a bun issue
There is basically nothing there except one server action and some ui stuff
its looking like next isnt actually getting upgraded
Yeah, maybe because of bun lock file
try killing the lock file, explicitly setting next ver, re-installing, then pushing to vercel
Ok, switching to pnpm worked, so I will try to create a new lockfile with bun
It can probably be marked as resolved
Thanks
what im guessing happened is because you had it as 'latest', the dep got aggressivly locked in the bun lockfile, and didnt get updated when you pushed to vecel
yessir
But first thing I set it to 14.0.0
before latest
And it didn't work at vercel
IDK
did you do a full reinstall / blow out the bun lockfile
I didn't, but before bumping up it was 13.5.8 or something
Default t3 version
thats probably why
iirc, installs will always use the lockfile versions, NOT the package.json versions
so if you update the package.json but not the lock file, youll have a version mismatch between the two and the builder will favor the lockfile
so somehow, it worked on your machine because you installed v14 to your node_modules, but it didnt get into the lock file
Yeah, that makes sense
Anyways it's bun's issue
regardless, i hope you now you understand my point on asking questions. here the context was bun, the relevant files, the process you had done to try and fix it already (starting with v14, then trying latest, etc)
glad we were able to get the issue resolved tho
I understand ofc. The thing I don't agree with is that it didn't require posting new question actually
oh no you didnt have to hahahah
LOL
you could have appended all this to the OG question
i was suprised when you opened a full new one lmao
Haaha