title: TypeError: window.require is not a function
body: <p>Im trying to build an electron app and want to use window.require. Unfortunately the compiler says "TypeError: window.require is not a function". Ironically <strong>require</strong> works <strong>only</strong> in main.js.</p>
  
  <p>Here the code Im trying to run:</p>
  
  <pre><code>const electron = window.require('electron')
  const low =  window.require('lowdb')
  const FileSync = window.require('lowdb/adapters/FileSync')
  </code></pre>
  
  <p>I read in another post that somebody have had the same problem and it was fixed by adding this code into the .html file:</p>
  
  <pre><code>    &lt;script type="text/javascript" src="../../../Gehaltseinstellungen_Hinzufügen.js"&gt;
          window.nodeRequire = require;
          delete window.require;
          delete window.exports;
          delete window.module;
      &lt;/script&gt;
  </code></pre>
  
  <p>Also the author said using "nodeRequire" instead of require would solve the problem but it doesn't...</p>
  
  <p>Another option I read about is that the NodeIntegration is set to false while the rendering process is activated, but I don't know how to activate Node while rendering.</p>