Suppress Next 15 Errors
Unanswered
American black bear posted this in #help-forum
American black bearOP
Hey, is there any way to suppress these errors and keep them to the browser console? Since Next 15 a lotta stuff on our platform needs to be updated, but it's dependent on libraries that haven't gotten rid of forwardRef yet for example. App works on dev/production, so looking for a more incremental way to adjust stuff.
5 Replies
<div suppressHydrationWarning={true}>
{/* content that might differ between server and client */}
</div>
American black bearOP
That doesn't work @Anay-208
it only suppresses hygration warnings. not any other warnings
American black bearOP
I understand that already, but my question is how do I get rid of that enforced error on Next 15 (same way it was on Next 14 where they'd only show in the browser console)
African Slender-snouted Crocodile
I'm tempted to say no... maybe you can ask for it in an Issue but not sure if it would be considered or not.
The line that creates the error overlay is here: [next/src/client/components/react-dev-overlay/app/ReactDevOverlay.tsx](https://github.com/vercel/next.js/blob/250370a0f897ead7fc66a460490e5897ccd18ab0/packages/next/src/client/components/react-dev-overlay/app/ReactDevOverlay.tsx#L78) and to have them not show you'd need the
When you click the 'x' inside the indicator, it sets the displayState to hidden [here](https://github.com/vercel/next.js/blob/250370a0f897ead7fc66a460490e5897ccd18ab0/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx#L256), but I don't see any configuration or env vars that might change the default initial state.
The line that creates the error overlay is here: [next/src/client/components/react-dev-overlay/app/ReactDevOverlay.tsx](https://github.com/vercel/next.js/blob/250370a0f897ead7fc66a460490e5897ccd18ab0/packages/next/src/client/components/react-dev-overlay/app/ReactDevOverlay.tsx#L78) and to have them not show you'd need the
initialDisplayState
to be 'hidden'
, I think.When you click the 'x' inside the indicator, it sets the displayState to hidden [here](https://github.com/vercel/next.js/blob/250370a0f897ead7fc66a460490e5897ccd18ab0/packages/next/src/client/components/react-dev-overlay/internal/container/Errors.tsx#L256), but I don't see any configuration or env vars that might change the default initial state.