DynamicServerError when deployed to Vercel
Unanswered
Jenn posted this in #help-forum
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')
}