Next not doing SSG routes?? Am I missing something?
Hi, I need to do this page ssg instead of dynamic server rendered, i dont have any dependencies so i have no idea whats happening,
gemini or chatgpt has no clue either.
9 Replies
I'm assuming you're using App Router? I don't think you need the
"use client"
at the top here.
This seems like it should be statically generated. Do you maybe have a repo we could use to debug this locally?hey
no, I can't share the repo
i removed the use client
still says dynamically generated, not static
Ok, can you reproduce the issue in a separate repo that you can share?
Just looking at the code you posted, I don't see a reason why it shouldn't be statically generated, so would need to dig deeper.
GitHub
t3nextbug/src/app/deviants/page.tsx at main · AndreuSCK/t3nextbug
Contribute to AndreuSCK/t3nextbug development by creating an account on GitHub.
`
In this config, i wanted everything public route
Im using a t3 stack + clerk
--
nah, I reverted the middleware to the old one, "/" being public, changed the main app / thing to this:
and still λ / dynamic
-----
All routes are dynamic in the repo, I don't know what I've changed, I only took t3 app and added clerk
https://github.com/AndreuSCK/t3nextbug
---
Its a "feature" of clerk, not a bug 🙄
So we should just wrap the components that need auth
Hey sorry, life got in the way, so I didn't get a chance to respond sooner.
But yeah, that tracks. I recently had to implement a custom auth solution, by adding some custom validation code to
middleware.ts
, and noticed that Next doesn't build routes that are behind auth. So I don't think it's strictly related to Clerk, more to Next itself.