Open dicash opened 1 year ago
I am having the "Uncaught Error: Minified React error #423;" with nextra. I really do not know where the hydration problems were coming from.
I am having the "Uncaught Error: Minified React error #423;" with nextra. I really do not know where the hydration problems were coming from.
I resolved mine by uninstalling the former nextra and nextra-theme-blog versions, then replacing it with their latest
The same issue
remove \n
or replace with <br />
I'm having this error Unknown root exit status
in production as well an have trouble finding more information about it. What does Unknown root exit status
even mean?
I'm not sure it this is at the origin of a bug I'm attempting to resolve, which consists of having the client code not loading or executing on the page (not "taking over"). Interactivity isn't enabled until the page is reloaded. Once reloaded other errors are triggered #425, #418, and #423.
Here is a video of what is happening:
https://github.com/vercel/next.js/assets/2759340/2c147964-3c0c-46e5-b664-0182784ea31d
Here is the code (open source, not well documented yet): https://github.com/SocialChangeLab/media-impact-monitor
And here the deployed URL: https://dev.mediaimpactmonitor.app/
I achieved to fix it by wrapping the react-query client provider in a Suspense boundary. However I keep having hydration errors (#422, #425) that only happen on production (vercel) and not when building locally (npm run build && npm run start). Not too sure why the issue happens and why it was fixed using a Suspense boundary. I only do client-side data-fetching and only use server-components the layout. 🤔
I finally managed to clear these errors. Sharing the solution in case somebody else find it useful. In my case the issue was as follows:
next-intl
for translations which required me to put my app under the dynamic [locale]
route.LocaleLayout
not-found.tsx
, which required me to create a RootLayout
in the project root.<Analytics />
and <SpeedInsights />
inside the RootLayout
:
import { PropsWithChildren } from "react";
import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from "@vercel/speed-insights/next";
// Since we have a root not-found.tsx
page, a layout file
// is required, even if it's just passing children through.
export default function RootLayout({ children }: PropsWithChildren) {
return (
<>
{process.env.NODE_ENV === "production" &&
Dynamically rendering `<Analytics />` and `<SpeedInsights />` in `RootLayout` is what caused the problem since `<html>` element was not available there. Once I moved the rendering of these components to my `LocaleLayout` the errors stopped.
To clarify I had these errors both when running `npm run build` locally and when deployed on Vercel.
Link to the code that reproduces this issue
https://codesandbox.io/p/sandbox/youthful-williamson-9pgj6k?file=%2Fpages%2Findex.tsx%3A4%2C2
To Reproduce
/app/page.tsx
Current vs. Expected behavior
Local next dev or local next build / next start work fine, logs are clear. When deployed to vercel, this shits the bed with errors like
Uncaught Error: Minified React error #425, #418, #423 and #329
Which areVerify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response