You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the "export const dynamic = "force-static"; " syntax in the server component to make the cache-control attribute of the header set in the middleware take effect. Unfortunately, at this time, using the "const t = await getTranslations();" or "const t= useTranslations();" methods in page.tsx will fail and the page will return a not found 404 page.
"next": "14.2.1",
"next-intl": "^3.11.1",
App Router with src dir
Verifications
I've verified that the problem I'm experiencing isn't covered in the docs.
I've searched for similar, existing issues on GitHub and Stack Overflow.
force-static is not intended to be supported, this section should be linked to from an error you're probably seeing in your app. To implement static rendering properly, please follow the static rendering guide (theoretically, after you've set this up, force-static might even work).
to make the cache-control attribute of the header set in the middleware take effect
Is that actually the case? That's quite interesting, I wonder if that behavior is intended.
force-static is not intended to be supported, this section should be linked to from an error you're probably seeing in your app. To implement static rendering properly, please follow the static rendering guide (theoretically, after you've set this up, force-static might even work).
to make the cache-control attribute of the header set in the middleware take effect
Is that actually the case? That's quite interesting, I wonder if that behavior is intended.
The problem has been solved with your help, thank you very much.
Description
I used the "export const dynamic = "force-static"; " syntax in the server component to make the cache-control attribute of the header set in the middleware take effect. Unfortunately, at this time, using the "const t = await getTranslations();" or "const t= useTranslations();" methods in page.tsx will fail and the page will return a not found 404 page.
App Router with src dir
Verifications
Mandatory reproduction URL
App Router
Reproduction description
Steps to reproduce:
Expected behaviour
Work well
The text was updated successfully, but these errors were encountered: