How to make static page in app router
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
I have this route that is leveraging
Code can be viewed here: https://github.com/typehero/typehero/blob/fe4564c261ea95dfa726a1f7421758d4bf1eea0c/apps/web/src/app/%5Blocale%5D/aot-2023/wrapped/page.tsx#L14-L24
However, when I view the page it is not static.
Am I doing something wrong here?
https://typehero.dev/aot-2023/wrapped
generateStaticParams and the build output says the page is staticCode can be viewed here: https://github.com/typehero/typehero/blob/fe4564c261ea95dfa726a1f7421758d4bf1eea0c/apps/web/src/app/%5Blocale%5D/aot-2023/wrapped/page.tsx#L14-L24
However, when I view the page it is not static.
Am I doing something wrong here?
https://typehero.dev/aot-2023/wrapped
5 Replies
@Asiatic Lion I have this route that is leveraging `generateStaticParams` and the build output says the page is `static`
Code can be viewed here: https://github.com/typehero/typehero/blob/fe4564c261ea95dfa726a1f7421758d4bf1eea0c/apps/web/src/app/%5Blocale%5D/aot-2023/wrapped/page.tsx#L14-L24
However, when I view the page it is not static.
Am I doing something wrong here?
https://typehero.dev/aot-2023/wrapped
add
assuming your
export const dynamicParams = false will make it truly staticassuming your
getStaticParams return the correct thingAsiatic LionOP
i’ll give it a shot, misleading the build logs say static though 

Asiatic LionOP
no luck
Broad-snouted Caiman
I'm facing the same issue. I'm using generateStaticParams in NextJS 15 RC. I'd expect the generated pages to be static, but they aren't. adding
fixes the issue but feels kinda weird. What am I overlooking?
The page itself does a call to the database directly. Does that somehow disable the (what I thought) static default?
export const dynamic = 'force-static'fixes the issue but feels kinda weird. What am I overlooking?
The page itself does a call to the database directly. Does that somehow disable the (what I thought) static default?