-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Error Overlay #12014
Comments
Your issue is with javascript, not react. React errors will give an overlay, whereas javascript errors crash the react app, hence no overlay. In this case, .map is not a method for objects, but arrays. |
I can confirm I'm having the same issue, and when I intentionally make react-related error (i.e. incorect import of components) I can see the overlay. However, before in CRA version 4.0.3 error overlay was also showing JS errors (i.e. map over undefined, not a function, etc). This is really helpful feature during development, and it's not particularly clear why they have removed it I ended up downgrading to 4.0.3 since it seems to be providing better development support and error overlay immediately appeared for JS specific error |
Though it was removed from CRA, This configuration used to work:
new ReactRefreshWebpackPlugin({
overlay: {
entry: require.resolve("react-dev-utils/webpackHotDevClient"),
module: require.resolve("react-dev-utils/refreshOverlayInterop"),
},
}); Whenever I eject a CRA (even with older versions of react-scripsts) I keep getting a webpack config without the maybe @pmmmwh would have an insight? |
I am facing the same problem. The react overlay is really useful when catching errors that cause for example an event handler to crash. It is much better to show the overlay instead of nothing happening in response to a click in an async context. |
@KutnerUri Is there a way to apply your temporary fix to CRA? |
Any chance we could get an idea when this will be fixed, please? For projects that are not ejected, it's impossible to change the webpack config, so we could really do with a proper fix. |
@Kyokatarz - sorry, it was a while ago, I forgot what I've done. It was tinkering with react-fast-refresh, probably after ejecting CRA. checkout "error overlays" here - https://github.com/pmmmwh/react-refresh-webpack-plugin#overlay-integration |
Hi, I have created and running new react app but the error overlay is not showing on the screen, i can only saw it in the console. can you please help me how can i enable this to development environment. Thanks
The text was updated successfully, but these errors were encountered: