Resolving Create React App’s “Uncaught ReferenceError: process is not defined”
A recent change to Create React App, or more specifically
react-scripts, has caused hot reloading to throw an error:
Uncaught ReferenceError: process is not defined. This is due to its dependency,
react-error-overlay, being referenced as
react-error-overlay’s latest patch version
6.0.10 is a breaking change. As a result, your installation likely uses
6.0.10 when it needs
6.0.9. To fix this, you unfortunately need to Frankenstein your
react-error-overlay@^6.0.9 entry, which should have its resolution [incorrectly]set to
Replace this entry with the following, which resolves to
Once saved, run
yarn install again to pull the correct version into your
.yarn/cache directory. Your React application should now hot reload correctly.
To track this error in an official capacity, you can view this issue on GitHub.