title: Getting blank screen in windows after electron-builder react electron app
body: <p>Getting blank screen in windows after electron-builder react electron app.</p>
  <blockquote>
  <p>Here is package.json. Getting blank screen in windows after electron-builder react electron app.</p>
  </blockquote>
  <pre><code>      {
    &quot;name&quot;: &quot;SmallBusinessManagement&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;bootstrap&quot;: &quot;^4.5.3&quot;,
      &quot;cross-env&quot;: &quot;^7.0.2&quot;,
      &quot;date-fns&quot;: &quot;^2.16.1&quot;,
      &quot;electron-is-dev&quot;: &quot;^1.2.0&quot;,
      &quot;jquery&quot;: &quot;^3.5.1&quot;,
      &quot;jspdf&quot;: &quot;^2.1.1&quot;,
      &quot;jspdf-autotable&quot;: &quot;^3.5.13&quot;,
      &quot;knex&quot;: &quot;^0.21.12&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;popper.js&quot;: &quot;^1.16.1&quot;,
      &quot;react&quot;: &quot;^17.0.1&quot;,
      &quot;react-dom&quot;: &quot;^17.0.1&quot;,
      &quot;react-popper&quot;: &quot;^2.2.4&quot;,
      &quot;react-redux&quot;: &quot;^7.2.2&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
      &quot;redux&quot;: &quot;^4.0.5&quot;,
      &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
      &quot;redux-thunk&quot;: &quot;^2.3.0&quot;,
      &quot;sqlite3&quot;: &quot;^5.0.0&quot;,
      &quot;wait-on&quot;: &quot;^5.2.0&quot;,
      &quot;web-vitals&quot;: &quot;^0.2.4&quot;
      
    },
    &quot;scripts&quot;: {
      &quot;postinstall&quot;: &quot;electron-builder install-app-deps&quot;,
      &quot;dist&quot;: &quot;electron-builder&quot;,
      &quot;pack&quot;: &quot;electron-builder --dir&quot;,
      &quot;react-start&quot;: &quot;react-scripts start&quot;,
      &quot;react-build&quot;: &quot;react-scripts build&quot;,
      &quot;react-test&quot;: &quot;react-scripts test&quot;,
      &quot;react-eject&quot;: &quot;react-scripts eject&quot;,
      &quot;electron-build&quot;: &quot;electron-builder&quot;,
      &quot;release&quot;: &quot;yarn react-build &amp;&amp; electron-builder --publish=always&quot;,
      &quot;start&quot;: &quot;concurrently \&quot;cross-env BROWSER=none yarn react-start\&quot; \&quot;wait-on http://localhost:3000 &amp;&amp; electron .\&quot;&quot;
    },
    &quot;build&quot;: {
      &quot;productName&quot;:&quot;SmallBussinessManagement&quot;,
      &quot;appId&quot;: &quot;com.smallbusinessmanagement&quot;,
      &quot;dmg&quot;: {
        &quot;contents&quot;: [
          {
            &quot;x&quot;: 110,
            &quot;y&quot;: 150
          },
          {
            &quot;x&quot;: 240,
            &quot;y&quot;: 150,
            &quot;type&quot;: &quot;link&quot;,
            &quot;path&quot;: &quot;/Applications&quot;
          }
        ]
      },
      &quot;win&quot;: {
        &quot;target&quot;: &quot;NSIS&quot;,
        &quot;icon&quot;: &quot;build/icon.ico&quot;
      },
      &quot;directories&quot;: {
        &quot;buildResources&quot;: &quot;resources&quot;,
        &quot;output&quot;: &quot;release&quot;
    }
    },
  
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;description&quot;: &quot;Small business management is used to manage daily sell and buy.&quot;,
    &quot;author&quot;: &quot;rakshithgowda KV&quot;,
    &quot;main&quot;: &quot;public/electron.js&quot;,
    &quot;homepage&quot;: &quot;./addItem&quot;,
    &quot;devDependencies&quot;: {
      &quot;electron&quot;: &quot;latest&quot;,
      &quot;electron-builder&quot;: &quot;latest&quot;
    },
    &quot;files&quot;: [
      &quot;*.js&quot;,
      &quot;build&quot;,
      &quot;node_modules&quot;
    ]
  }
  </code></pre>
  <blockquote>
  <p>public/electron.js. Do i need to isntall any dependency ?</p>
  </blockquote>
  <pre><code>const { app, BrowserWindow,Menu } = require('electron')
  require('../src/messgaeController/main');
  const path = require(&quot;path&quot;);
  const isDev = require(&quot;electron-is-dev&quot;);
  
  let addItem ;
  let win;
  function createWindow () {
     win = new BrowserWindow({
      width: 800,
      height: 600,
      icon:&quot;build/icon.ico&quot;,
      webPreferences: {
        nodeIntegration: true,
        // webSecurity: false
      }
    })
  
    win.loadURL(isDev? &quot;http://localhost:3000&quot;: `file://${__dirname}/../build/index.html`);
      win.on(&quot;closed&quot;, () =&gt; (mainWindow = null));
  
    const mainMenu = Menu.buildFromTemplate(menuTemplate);
    Menu.setApplicationMenu(mainMenu);
    // win.webContents.openDevTools()
  
    win.on(&quot;close&quot;,()=&gt;app.quit())
  }
  </code></pre>
  <p>Not sure why it's showing blank page after build. Tried different approach, didn't work</p>
  <p><a href="https://i.stack.imgur.com/d8WaS.png" rel="nofollow noreferrer">enter image description here</a></p>