Dynamic server error
i am new to react, nextjs and t3 stack in general
i am trying to implement clerk with the t3 stack (app router, trpc, tailwind, prisma)
but i am getting dynamic server error when pushing my code to vercel
can someone please guide me
27 Replies
Could you please post some screenshots of the error and of how your code is setup?
just give me 1m
You need to setup up your dynamic login and register routes on top of adding the middleware and ensuring your APIS keys are correct.
layout.tsx
mmmmmmmmmmmm
i am new with t3
wait let me give u the github
its very small
That would help too
i tried app router before and couldnt figure out how to fix this
Is your time set correctly on your computer? There was a huge issue with that.
GitHub
GitHub - kaleembhattiworks/fixingcambridgestudies
Contribute to kaleembhattiworks/fixingcambridgestudies development by creating an account on GitHub.
yes
i had it on pages router (issue)
vercel error
i had the same issue but i ignored it and went on with my work
but some time down the line i started having issues with clerk because of this (dynamic server error)
Try that
Sounds like some people are getting the issue too.
yes i have searching for like 2 3 hours and many people have the same issue
ill try this
this would go inside layout.tsx ...
i am a noob
its been just 2 weeks and i only knew javascript. everything else is new
Solution
i just did
and all errors from vercel are gone
i dont think that this is the most performant solution but it works
can u tell me how to implement this
maybe this would be better
What exactly are you trying to do? Setup Auth using Clerk?
You just need to follow the steps in this guide for next.js. It looks like you are using NextAuth so it seems to me you are trying to setup two different auth solutions at the same time.
Add authentication and user management to your Next.js app with Cle...
Learn how to use Clerk to quickly and easily add secure authentication and user management to your Next.js application. Clerk works seamlessly on both client side and server side components.
The TRPC you should be using for your API routes and server actions.
What database are you using?
planetscale
the issues comes because the trpc provider uses cookies
and that isnt allowed
Ahhhhh that makes sense.
thanks for the help
I hope something official pops up
i almost quit twice because of this
Well don’t give up. That’s the true testament to a developer.
Why not learn the stack bit by bit? Jumping to the full T3 stack is likely going to be overwhelming coming from just javascript. Before prisma maybe use raw SQL. Before trpc, learn NextJS server actions & other server-client paradigms. Tailwind is easy so you no problem there.
I just came here with the same issue and this here saved my ass thank you
I would agree, to learn more about of the lower level things before jumping to the abstracted layers built on top of everything.
that is true but idk
i had stopped coding for half a year and saw this as a come back