title: ELectron React Boilerplate random error at start
body: <p>I have a project, very simple, based on ERB, but 50% of the time I started I get the following error in the (webkit) console:</p>
  <pre><code>Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
      at Object.injectIntoGlobalHook (react-refresh-runtime.development.js:449:1)
      at Object../node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js (ReactRefreshEntry.js:17:1)
      at Object.options.factory (react refresh:6:1)
      at __webpack_require__ (bootstrap:24:1)
      at startup:4:1
      at startup:10:1
      at webpackUniversalModuleDefinition (universalModuleDefinition:7:1)
      at universalModuleDefinition:10:2
  </code></pre>
  <p>The application starts, load a blank screen with the above error in the console.</p>
  <p>In the terminal I see the following messages:</p>
  <pre><code>08:21:21.774 &gt; Skip checkForUpdatesAndNotify because application is not packed
  &lt;i&gt; [webpack-dev-middleware] wait until bundle finished: /index.html
  [19072:0519/082130.210:ERROR:CONSOLE(160)] &quot;Electron sandbox_bundle.js script failed to run&quot;, source: node:electron/js2c/sandbox_bundle (160)
  [19072:0519/082130.210:ERROR:CONSOLE(160)] &quot;TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))&quot;, source: node:electron/js2c/sandbox_bundle (160)
  </code></pre>
  <p>The crazy thing is that yesterday before closing the PC it was working fine, this morning, I've run it again without making any change, the same code as yesterday, and I get the error.</p>
  <p>Please give me some hint because I really don't know what to search for!</p>