question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v5 Regression react-error-overlay build - Uncaught ReferenceError: process is not defined

See original GitHub issue

I use following command to start: npm run start

Then, whenever I save a file, I get the following “Uncaught ReferenceError: process is not defined” error in the browser console.

VM27:2 Uncaught ReferenceError: process is not defined
    at Object.4043 (<anonymous>:2:13168)
    at r (<anonymous>:2:306599)
    at Object.8048 (<anonymous>:2:9496)
    at r (<anonymous>:2:306599)
    at Object.8641 (<anonymous>:2:1379)
    at r (<anonymous>:2:306599)
    at <anonymous>:2:315627
    at <anonymous>:2:324225
    at <anonymous>:2:324229
    at HTMLIFrameElement.e.onload (index.js:1)
4043 @ VM27:2
r @ VM27:2
8048 @ VM27:2
r @ VM27:2
8641 @ VM27:2
r @ VM27:2
(anonymous) @ VM27:2
(anonymous) @ VM27:2
(anonymous) @ VM27:2
e.onload @ index.js:1
be @ index.js:1
he @ index.js:1
tryDismissErrorOverlay @ webpackHotDevClient.js:184
onSuccessfulHotUpdate @ webpackHotDevClient.js:150
handleApplyUpdates @ webpackHotDevClient.js:257
(anonymous) @ webpackHotDevClient.js:276
load (async)
be @ index.js:1
he @ index.js:1
tryDismissErrorOverlay @ webpackHotDevClient.js:184
onSuccessfulHotUpdate @ webpackHotDevClient.js:150
handleApplyUpdates @ webpackHotDevClient.js:257
(anonymous) @ webpackHotDevClient.js:276
Promise.then (async)
tryApplyUpdates @ webpackHotDevClient.js:271
handleWarnings @ webpackHotDevClient.js:147
push../node_modules/react-dev-utils/webpackHotDevClient.js.connection.onmessage @ webpackHotDevClient.js:210

react-scripts 4.0.3 npm 6.14.8 node v14.18.1 FreeBSD 12.2-RELEASE-p4 GENERIC amd64

The project compiles just fine, but the hot reloading seems to be erroring.

I have no problem with react-scripts 3

Isnt process a node environment variable? How does it end up in the browser?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:96
  • Comments:106 (5 by maintainers)

github_iconTop GitHub Comments

137reactions
raixcommented, Dec 16, 2021

Does ‘rm -rf node_modules’ and then npm/yarn install resolve the issue?

128reactions
zanderisraelcommented, Dec 16, 2021

same here… Hot reload continues to work, but the page becomes unresponsive. Can’t click or do anything unless you do a manual refresh.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Uncaught ReferenceError: process is not defined
The error is as a result of react-error-overlay (which many people would never have heard of because it is a dependency of react-scripts...
Read more >
Resolving Create React App's “Uncaught ReferenceError
A recent change to Create React App, or more specifically react-scripts , has caused hot reloading to throw an error: Uncaught ...
Read more >
Feb 22
v5 Regression react -error-overlay build - Uncaught ReferenceError: process is not defined · Issue... I use following command to start: npm ...
Read more >
process is not defined , while the Ui freezes on using D2 ...
One reason why you may still be encountering this issue might be due to using react-scripts v5 (instead of v4). If you'd like...
Read more >
importscripts is not defined react - You.com | The AI Search ...
The original issue might have been a bug in webpack or the transpilation might have changed the code in a weird way. const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found