Next.js Discord

Discord Forum

Next Auth & Vercel CLIENT_FETCH_ERROR

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Hi, I am having this problem where deploying to vercel the build fails with the issue shown in the image below.

I have went through countless stackoverflow suggestions and nothing seemed to fix this issue. Env variables are also set as required so need help figuring out why this happens in vercel but when i build it* LOCALLY*, it build completely fine.

8 Replies

Oak apple gall wasp
Do you have set env correctly?
There is public/server env options if u missed it
Asiatic LionOP
@Oak apple gall wasp These are what I have, I set them up based off what i was able to read in the docs but idk if there may be something i missed.
ignore base_api_url, that is for something else
Builds perfectly fine locally but not on vercel for some reason
Northeast Congo Lion
This is a huge block for us. Would be great if anyone has encountered this as well and has a fix to it.
Blanc de Hotot
i think you should added them like this way
NEX_PUBIC_WHATEVER_YOU_WANT
I think I solved this by not including nextauth url as it already gets it off vercels env vars