Upgrading your application to CRA (react-scripts) v5 with npm i react-scripts@latest
will fix the issue.
If your app is not able to be upgraded because dependencies are incompatible or you require node version < 14, you can try the following workaround which worked for me:
- Revert back to CRA 4:
npm i --save-exact react-scripts@4.0.3
- Add react-error-overlay as a dev dependency:
npm i --save-dev react-error-overlay@6.0.9
- Then add the following line to your package.json
"resolutions": {
"react-error-overlay": "6.0.9"
},
-
If you’re using
NPM
, force your package-lock.json file to actually use 6.0.9 withnpx npm-force-resolutions
If you’re using
Yarn
, just runyarn install
and your resolutions will be applied and fix the issue
More info at https://github.com/facebook/create-react-app/issues/11773