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
With the breaking change of the Next.js version 15 of the Async Request APIs we need to change the implementation of receiving the headers in Server-Side Rendering.
Currently the following error occurs, when trying to access const t = useTranslations() in an Server Component:
[ Server ] Error: Route "/[locale]" used `headers().get('X-NEXT-INTL-LOCALE')`. `headers()` should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
Verifications
I've verified that the problem I'm experiencing isn't covered in the docs.
Description
With the breaking change of the Next.js version 15 of the Async Request APIs we need to change the implementation of receiving the headers in Server-Side Rendering.
Currently the following error occurs, when trying to access
const t = useTranslations()
in an Server Component:Verifications
Mandatory reproduction URL
https://github.com/amannn/next-intl-bug-repro-app-router
Reproduction description
Expected behaviour
Repository should be updated to support next@15
The text was updated successfully, but these errors were encountered: