-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Is this the bug of react-error-overlay? #11773
Comments
Thank you for opening this issue, feels good to know I'm not alone. It seems to be related to #8583. |
@davepinto Yes, you are correct. Compiling production builds are successful, it just effect react hot reload. By the way, is there any workaround to make |
I'm having the same problem here... I tried in every way to solve this problem |
Sounds stupid, but putting this on top of your index.js/index.ts file helps
edit: Better solution 3 posts below :) |
Exact same issue, just updated |
Sorry, the "workaround" still blocked the screen, though the errow was muted. What REALLY helped was putting a fixed version of
|
Thank you so much. I thought I was going insane with this.. 4.0.1, upgrading to MUI v5. It only happens to me on HMR. |
i already have that version still getting that error... |
I've closed #11771 in favor of this issue. Thanks @Emiya0306 for the clear title and issue reporting, visuals etc. it really helps ton, thank you! ❤️
CRA v5 no longer use react-error-overlay instead work together with the Webpack team on one error-overlay (if anyone are interested in improving it feel free to reach out Here) Temporary workaround if you are blocked and cannot upgrade to CRA v5: See #11773 (comment) - this worked when testing both yarn and npm - You might have to remove the lock file and node_modules folder (if using yarn you can use resolutions - but again you shouldn't have to) After running yarn or npm install you can verify the version e.g. |
I'm also interested in the resolution for this issue. |
Thx, for me this got rid of the "process is not defined" error - however the hot reloading still does not work. I can see a chunk being downloaded but the page does not reflect that change. Only after reload I can see the changes. This worked before downgrading to 4.0.3. |
Also add specific react-error-overlay dependency to fix facebook/create-react-app#11773 (comment)
I upgraded react-scripts to v5, but now my app won't start using npm. I get the following error:
Any ideas? |
Try bumping up the heap size: |
issue facebook/create-react-app#11773 is preventing HMR from working w/ cra4. Should be fixed soon, until this this at least prevents things from breaking hard. Alternately we can upgrade to v5
That doesn't seem to be the issue. These steps were the only way I could get my app to start again:
I did increase the heap size slightly, but I tried upgrading react-scripts to v5 again and it still won't start due to the heap out of memory issue. It seems my app will only run on 4.0.3, but I am still stuck with the injected iframe overlay with every hot reload. |
You are not stuck with it. There is a perfectly good solution here: #11773 (comment) Just add the fixed dependency version to the
|
No, that still doesn't work. I have tried adding "react-error-overlay": "6.0.9" to both devDependencies (as per that comment) and now resolutions as per your suggestion. Neither option fixes the issue. |
Adding it to devDepencies won't work. You need to use resolutions with yarn, or use npm-force-resolutions to force the version to be what you specified. Check your lockfile to make sure that the version of react-error-overlay in your app is in fact |
Using npm-force-resolutions did the trick, thank you! Anyone know why upgrading to v5 would not allow the app to start? |
My guess is that there are some deeply nested dependency incompatibility issues associated with v5 of create-react-app. As you can see from this current issue, the problem was that I would hold off on upgrading to cra v5 yet, unless your project is pretty small and doesn't use a lot of dependencies, otherwise, let the react team consolidate broken dependencies, and we'll see what happens with |
Definitely happening, react-error-overlay v6.0.10 crash with process is undefined, yarn resolutions to force react-error-overlay v6.0.9 is currently working around the issue. |
see facebook/create-react-app#11773 for more details.
When I use self-closing tags in my react application, where they are being closed like <></,> instead of only </>, they are escaping react-overlay and crash my application do you have any idea about this bug? |
@pateljay1397 the React fragment issue is probably not related. Please open a new issue with all required details. |
yarn add react-error-overlay@6.0.9 --dev package.json |
react-error-overlay@6.0.10 was published with react-scripts@5.0.0 and does not work well with react-scripts@4. So we need to fix it's version. See more: facebook/create-react-app#11773 Signed-off-by: Sergey Zakhlypa <sergey.zakhlypa@secomind.com>
The following helped me and because i use webpack and plugin react-refresh-webpack-plugin: |
add this to file html in public folder. this worked for me |
see facebook/create-react-app#11773 for more details.
see facebook/create-react-app#11773 for more details.
|
Change react-scripts to "5.0.1" work for me. |
Describe the bug
When I change the code and emit the hot-reload, there is iframe cover the whole page and report
Uncaught ReferenceError: process is not defined
.Did you try recovering your dependencies?
Yes. It wasn't happened before I recover my dependencies.
After I recover my dependencies(remove node_module / package-lock.json and reinstall the dependencies), the problem has been there.
Which terms did you search for in User Guide?
Uncaught ReferenceError: process is not defined
hot-reload
webpackHotDevClient
"win32"===process.platform
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from /Users/xxx/.config/yarn/global/node_modules/create-react-app
System:
OS: macOS Mojave 10.14.3
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 11.6.0 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Browsers:
Chrome: 96.0.4664.110
Edge: Not Found
Firefox: 94.0.2
Safari: 12.0.3
npmPackages:
react: 16.12.0 => 16.12.0
react-dom: 16.12.0 => 16.12.0
react-scripts: ^4.0.3 => 4.0.3
npmGlobalPackages:
create-react-app: Not Found
(paste the output of the command here.)
Steps to reproduce
npm start
Expected behavior
Console will not report the
Uncaught ReferenceError: process is not defined
and there is no iframe cover the page.Actual behavior
Console reports the
Uncaught ReferenceError: process is not defined
and there is the iframe cover the page.Reproducible demo
I will try to reproduce the demo later when I'm free, report the problem at first.
The text was updated successfully, but these errors were encountered: