admin 管理员组文章数量: 1086019
I have a localized Next.js 14 app. I followed the setup described in the Nextjs i18n docs, and I have my root layout within an /app/[lang]
directory. When I add a 404 page to this directory (/app/[lang]/not-found.tsx
), it is not displaying this page on invalid routes. I still get the default 404 page. When I try placing the not-found.tsx file directly within the app folder (/app/not-found.tsx
), I get the following error:
"not-found.tsx doesn't have a root layout. To fix this error, make sure every page has a root layout." Of course, I want to keep my root layout within the [lang] folder to keep the app localized.
本文标签: localization404 Page not Displaying in Localized Nextjs 14 AppStack Overflow
版权声明:本文标题:localization - 404 Page not Displaying in Localized Next.js 14 App - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744020331a2519655.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论