Error with next-intl and Dynamic Routes When Using next export in Next.js
Unanswered
Deodeep Kunj posted this in #help-forum
Hello,
I’m working on a Next.js app (latest version) where I’ve implemented next-intl for language translation. My app has dynamic routes, including pages like /blog and /blog/[id]. Everything works perfectly during development and production builds, but I’m encountering issues when running next export.
Here are some key details:
The app uses next-intl to manage translations.
I have dynamic routes for blogs and blog details.
Static export is a requirement for the project.
When running next export, I receive an error related to dynamic routes or locale handling, which prevents the build from completing.
Steps I’ve tried:
Ensured all routes have proper fallback configurations.
Verified next-intl usage aligns with documentation.
Tried different configurations in next.config.js for i18n.
Questions:
Is there a known limitation or workaround for using next-intl with next export?
How can I handle dynamic routes effectively in a static export while preserving translations?
Are there specific configurations or plugins I need to adjust for compatibility?
Any insights or guidance would be greatly appreciated!
I’m working on a Next.js app (latest version) where I’ve implemented next-intl for language translation. My app has dynamic routes, including pages like /blog and /blog/[id]. Everything works perfectly during development and production builds, but I’m encountering issues when running next export.
Here are some key details:
The app uses next-intl to manage translations.
I have dynamic routes for blogs and blog details.
Static export is a requirement for the project.
When running next export, I receive an error related to dynamic routes or locale handling, which prevents the build from completing.
Steps I’ve tried:
Ensured all routes have proper fallback configurations.
Verified next-intl usage aligns with documentation.
Tried different configurations in next.config.js for i18n.
Questions:
Is there a known limitation or workaround for using next-intl with next export?
How can I handle dynamic routes effectively in a static export while preserving translations?
Are there specific configurations or plugins I need to adjust for compatibility?
Any insights or guidance would be greatly appreciated!