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.

Cannot read property 'forEach' of undefined -- Only on macOS

See original GitHub issue

Error message:

19:16:33.302 › TypeError: Cannot read property 'forEach' of undefined
    at Object.injectIntoGlobalHook (webpack-internal:///./node_modules/react-refresh/cjs/react-refresh-runtime.development.js:461:20)
    at eval (webpack-internal:///./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js:8:20)
    at ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js (http://localhost:1212/dist/renderer.dev.js:1448:1)
    at Object.options.factory (http://localhost:1212/dist/renderer.dev.js:26372:31)
    at __webpack_require__ (http://localhost:1212/dist/renderer.dev.js:25711:33)
    at http://localhost:1212/dist/renderer.dev.js:26927:11
    at http://localhost:1212/dist/renderer.dev.js:26935:12
setTimeout (async)
consoleLog @ console.js:93
transport @ console.js:46
runTransport @ log.js:44
(anonymous) @ ipc.js:21
emit @ events.js:315
onMessage @ electron/js2c/renderer_init.js:91

Identical setup works perfectly on Windows and Linux so I’m not really sure what to make of it. I tried deleting the entire node_modules folder and reinstalling, but the issue persists.

Environment:

  • macOS 10.13.x
  • Electron 11.3.x

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pmmmwhcommented, Mar 24, 2021
1reaction
pmmmwhcommented, Mar 21, 2021

The issue seems to originate from the react-refresh/runtime instead of this plugin. Mind filing an issue on the React repo instead?

Are you sure your runtime have a working Map or Set implementation?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'forEach' of undefined #490
Issue description When running the CLI on a stats file (not all stats files, just some), I'm getting the following error, and the...
Read more >
Cannot read property 'forEach' of undefined - Stack Overflow
The expression 1, 2 becomes just 2 (comma operator), so you're trying to access index 2 of an empty array: [][2] // undefined....
Read more >
cannot read properties of undefined (reading 'foreach') react
See, useTable expects array to be provided as data value (docs). You're supplying it with empty object instead, which is initial value of...
Read more >
Cannot read property 'forEach' of undefined - Reddit
Cannot read property 'forEach' of undefined. Hey guys,. I'm having an issue with Apps Script x Facebook Graph API integration.
Read more >
Command Line Tools | Apple Developer Forums
Not a question, but just informing you all that I've been having issues with ... VM72:32 Uncaught TypeError: Cannot read property 'forEach' of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found