Trouble with statically exporting client components #1158
Unanswered
KieranMarien
asked this question in
Q&A
Replies: 1 comment 2 replies
-
From a first look it seems like the issue is that you're not using a setup with or without i18n routing consistently (see also: Unable to find next-intl locale because the middleware didn't run on this request) If you're using the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to use use translations in a client component and then statically exporting the application. I tried to follow the statically rendering guide as best as possible but I'm a bit confused. https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing#static-rendering
Ignore that it only uses en_us. Just temporary for dev.
app layout looks like this
/app
/[locale]
page1
layout1
/sub
page2
layout2
Both pages are "use client"
My i18n.ts file
My layout1 file
example of a page
It works perfectly in dev mode. But as soon as I statically export it gives a 404 when even trying to go to the page. I've tried plating with the localeprefix but that doesn't seem to make a difference. So I'm kinda lost what the next steps are. Any help or advice is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions