title: Electron Error: Requires constructor call
body: <p>While trying the electron using their <a href="http://electron.atom.io/docs/latest/tutorial/quick-start/" rel="nofollow noreferrer">Quick Start here</a>. I encountered a weird problem. Searching on google yields no results.</p>
  
  <p>following is my directory tree</p>
  
  <p>.<br>
  ├── index.html<br>
  ├── main.js<br>
  ├── node_modules<br>
  │   └── electron-prebuilt<br>
  └── package.json  </p>
  
  <p>contents of <code>package.json</code></p>
  
  <pre><code>{
    "name": "desktop-widget",
    "version": "1.0.0",
    "main": "main.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
      "electron": "^0.4.1",
      "electron-prebuilt": "^0.36.7"
    },
    "devDependencies": {},
    "description": ""
  }
  </code></pre>
  
  <p>contents of <code>main.js</code></p>
  
  <pre><code>'use strict';
  
  const electron      = require('electron');
  const app           = electron.app;
  const BrowserWindow = electron.BrowserWindow;
  
  var mainWindow = null;
  
  app.on('ready', function() {
      mainWindow = BrowserWindow({width: 800, height: 600});
      mainWindow.loadURL('file://', __dirname, 'index.html');
  
      mainWindow.on('closed', function() {
          mainWindow = null;
      })
  
  });
  </code></pre>
  
  <p>on running the command <code>node_modules/electron-prebuilt/dist/electron .</code><br>
  i get the following error:
  <a href="https://i.stack.imgur.com/AWmme.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AWmme.png" alt="enter image description here"></a></p>