I've integrated next-intl with the App Router in my Next.js project, including setting up i18n routing. Everything works flawlessly in development mode, but when I build the project for production and deploy it, I encounter a 500 Internal Server Error on the root page ("/").
TypeError: Cannot read properties of undefined (reading 'clientModules')
Details:
- The project runs perfectly in development mode.
- The error occurs only in production, specifically on the root page.
- Internal pages are not affected and work as expected.
Has anyone experienced this issue or have any ideas on how to resolve it? Any insights or suggestions would be greatly appreciated.
I'm expecting the root page ("/") to work in production mode just as it does in development mode, without throwing a 500 Internal Server Error. Specifically, I want the i18n routing implemented with next-intl to function correctly across all pages, including the root, without encountering the "TypeError: Cannot read properties of undefined (reading 'clientModules')" error.
Any advice on how to achieve this would be greatly appreciated.