Next.js Discord

Discord Forum

Next -Intl and problem with SSG pages

Unanswered
mati_t_01 posted this in #help-forum
Open in Discord
Hello everyone,

I have weird problem on vercel - Looks like my pages cannot be generated. Deploy is successfull, web app is available, but I got this on vercel:

[23:30:55.748] description: "Route /[locale]/blog/[slug] couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error",
[23:30:55.748] digest: 'DYNAMIC_SERVER_USAGE'

Can next-intl can be used with ssg?

Full error attached


2 Replies

Asian black bear
The error message in your linked log literally explains why this is happening and how you could fix it.
Hi @Asian black bear thanks for answer.

Yes - and I followed this advices. I set setRequestLocale in blog page, in main layout, but still nothing. Maybe I should mentioned what I did, but I thought error is known. So, even with setRequestLocale still same errors 😦