title: Electron loadFile is not a function
body: <p>I'm developing an app using Electron. Using <code>win.loadFile('index.html')</code> used to work, but from yesterday it throws an error saying: <code>win.loadFile is not a function</code>.</p>
  
  <p>Could it be "Knex.js" which caused this error? Because I installed it recently and the problems began to appear after that. Also, I noticed that Electron icon changed from transparent to a light blue (green) circle.</p>
  
  <p>In addition, Using <code>loadURL</code> works but it renders the html file incompletely.</p>
  
  <p>This is my main.js (I removed knex.js code from main.js but didn't help):</p>
  
  <pre><code>const { app, BrowserWindow } = require('electron')
  const url = require('url')
  const path = require('path')
  
  function createWindow () {
    // Create the browser window.
    let win = new BrowserWindow({
      width: 800,
      height: 600,
      webPreferences: {
        nodeIntegration: true
      }
    })
  
    // and load the index.html of the app.
     win.loadFile('index.html');
  }
  
  app.on('ready', createWindow)
  
  </code></pre>