Next intl has an error in Next.js 14 #675
Replies: 5 comments 7 replies
-
Hi, the tutorial you're referencing seems to be slightly outdated. Please follow the official getting started guide or alternatively check out the App Router example. I'll move this to a discussion since it's not a bug report but a usage question. |
Beta Was this translation helpful? Give feedback.
-
Hey ! I've just got the same issue and I find the cause issue... I have the exact same config as the repo "App demo" |
Beta Was this translation helpful? Give feedback.
-
I have same problems |
Beta Was this translation helpful? Give feedback.
-
I had the same error. Thanks to the example, I found that in the middleware.ts file, in the exported config.matcher, you need to add the following line: After doing this, the error disappeared |
Beta Was this translation helpful? Give feedback.
-
I had this error and resolved by these steps :
`export function generateStaticParams() { export async function generateMetadata({ params: { locale } }: { params: any }) { return { 3.ensure this code is available in your middleware config |
Beta Was this translation helpful? Give feedback.
-
Description
I have a question, the dependent version is Next.js 14.
I am based on https://i18nexus.com/tutorials/nextjs/next-intl Using a case study to edit the code, I found the following errors.
terminal:
error:node_modules\next-intl\dist\development\config.js (6:8) @ getConfig
console
error1: Couldn't find next-intl config file. Please follow the instructions at https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components
error2: http://localhost:3000/de 404 (Not Found)
error3: validateDOMNesting(...):
error4:DOMException: Failed to execute 'appendChild' on 'Node': Only one element on document allowed.
I see a link: https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components
But I can't open it -.-
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://github.com/SuperCodeCandy/Intl-error-demo/tree/main
Reproduction description
Can be viewed https://github.com/SuperCodeCandy/Intl-error-demo/tree/main
Expected behaviour
I'm not sure if it's because next-intl doesn't support Next.js14.
Beta Was this translation helpful? Give feedback.
All reactions