title: Electron start script error
body: <p>i am running a webpack project and running this script 
  <br>My <strong>package.json</strong> looks like this</p>
  
  <pre><code>{
      "name": "collab-ui",
      "version": "0.0.10",
      "author": {
          "name": "some-name",
          "email": "some-emailId"
      },
      "main": "electron.js",
      "scripts": {
          "start": "rimraf debug &amp;&amp; npm outdated &amp;&amp; webpack --watch",
          "http": "rimraf debug &amp;&amp; npm outdated &amp;&amp; webpack --watch",
          "release": "rimraf dist &amp;&amp; webpack --bail --progress --profile",
          "elecstart": "rimraf debug &amp;&amp; webpack &amp;&amp;  electron .",
          "elecrel": "electron-packager . XorChat --all",
      },
      "devDependencies": {
          "@types/jquery": "2.0.41",
          "api-ai-javascript": "^2.0.0-beta.21",
          "autoprefixer": "~6.7.7",
          "awesome-typescript-loader": "~3.1.2",
          "browser-sync": "~2.18.8",
          "browser-sync-webpack-plugin": "~1.1.4",
          "css-loader": "~0.27.3",
          "custom-event-polyfill": "~0.3.0",
          "electron": "^1.7.9",
          "electron-packager": "^9.1.0",
          "es6-promise": "~4.1.1",
          "extract-text-webpack-plugin": "~2.1.0",
          "file-loader": "~0.10.1",
          "html-loader": "~0.4.5",
          "html-webpack-plugin": "~2.28.0",
          "html5-notification": "~3.0.0",
          "http-proxy-middleware": "~0.17.4",
          "import-glob-loader": "~1.1.0",
          "knockout": "~3.4.2",
          "live-server": "~1.2.0",
          "node-sass": "~4.5.0",
          "open-browser-webpack-plugin": "~0.0.5",
          "postcss-loader": "~1.3.3",
          "qrcode-generator": "~1.3.1",
          "resolve-url-loader": "~2.1.0",
          "rimraf": "~2.6.1",
          "sass-loader": "~6.0.3",
          "socket.io-client": "~2.0.3",
          "store": "~2.0.12",
          "style-loader": "~0.14.1",
          "ts-loader": "~2.0.2",
          "typescript": "~2.2.1",
          "url-loader": "~0.5.8",
          "webpack": "~2.2.1",
          "webpack-dev-middleware": "~1.10.1",
          "webpack-dev-server": "~2.4.2",
          "webpack-hot-middleware": "~2.17.1",
          "webpack-stream": "~3.2.0",
          "webrtc-adapter": "^6.0.2",
          "uuid": "^3.1.0"
      }
  }
  </code></pre>
  
  <p><br>
  My  <strong>electron.js</strong> looks like this</p>
  
  <pre><code>const electron = require('electron');
   const { app, BrowserWindow } = electron;
   app.commandLine.appendSwitch("ignore-certificate-errors");
   app.on('ready', () =&gt; {
  
       let win = new BrowserWindow({ width: 800, height: 600 });
       win.loadURL(`file://${__dirname}/debug/index.html`);
       win.webContents.openDevTools();
   })
  </code></pre>
  
  <p><br>But after running <strong>npm run elecstart</strong>, i am getting this error
  <a href="https://i.stack.imgur.com/CGhFT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CGhFT.png" alt="enter image description here"></a></p>
  
  <p>Any clue,why i am getting this error. i am running on windows 10 64bit, 8 gb ram(FYI), but after running the script the window error box comes as shown in the image and after i close it , the script halts.I am suspecting some JS error to be in there, as it is not able to find some symbol or some configuration is missing. Any help is appreciated.</p>