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
[X] 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