Error with not-found page during the build process #1332
Unanswered
SvetlanaZinovkina
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm encountering an issue while using next-intl in my Next.js pet-project (https://github.com/SvetlanaZinovkina/next-frontend-embroidery-shop/blob/main/src/app/not-found.tsx). During the build process, I get the following error:
Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the
unstable_setRequestLocale
API to enable static rendering[Error]: Dynamic server usage: Route /_not-found couldn't be rendered statically because it used
headers
.Here’s what I’ve tried so far:
Reviewed the next-intl documentation on static rendering.
Attempted to refactor some code into other components, but the error persists.
Could you advise on how to work around this limitation so that the /not-found route can remain statically rendered without needing to switch to dynamic rendering?
Thank you in advance for your help!
Best regards,
Sveta
Beta Was this translation helpful? Give feedback.
All reactions