DynamicServerError when deployed to Vercel
Unanswered
Jenn posted this in #help-forum
![Avatar](https://cdn.discordapp.com/avatars/914499424443564062/f07bf4cbd10e8218dbd3ae847cf06e7b.webp?size=256)
JennOP
I encountered this error when deploying my Next.js and Supabase project on Vercel. Strangely, even when attempting to re-deploy a previously functional version of the project, the error now appears, which was not the case earlier. Also in: https://stackoverflow.com/questions/77410341/dynamicservererror-when-deployed-to-vercel-but-previous-builds-did-not-show-this
Github repo: https://github.com/Jennelle186/NextJS-Supabase
I am using this similar code in almost every page of mine:
Github repo: https://github.com/Jennelle186/NextJS-Supabase
I am using this similar code in almost every page of mine:
const supabase = createServerComponentClient({ cookies });
const {data: {session }} = await supabase.auth.getSession();
if(!session){
redirect('/login')
}
![Image](https://cdn.discordapp.com/attachments/1169636837564878859/1169636837829124116/image.png?ex=65562030&is=6543ab30&hm=aa784fdb23214c05cd369c6cbad75a256dafc2ab45a9e2a366122a4dc667cfd1&)