{"action":"closed","issue":{"url":"https://api.github.com/repos/atom/electron/issues/3760","labels_url":"https://api.github.com/repos/atom/electron/issues/3760/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/3760/comments","events_url":"https://api.github.com/repos/atom/electron/issues/3760/events","html_url":"https://github.com/atom/electron/issues/3760","id":121498559,"number":3760,"title":"New api electron","user":{"login":"saiberz","id":1022999,"avatar_url":"https://avatars.githubusercontent.com/u/1022999?v=3","gravatar_id":"","url":"https://api.github.com/users/saiberz","html_url":"https://github.com/saiberz","followers_url":"https://api.github.com/users/saiberz/followers","following_url":"https://api.github.com/users/saiberz/following{/other_user}","gists_url":"https://api.github.com/users/saiberz/gists{/gist_id}","starred_url":"https://api.github.com/users/saiberz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saiberz/subscriptions","organizations_url":"https://api.github.com/users/saiberz/orgs","repos_url":"https://api.github.com/users/saiberz/repos","events_url":"https://api.github.com/users/saiberz/events{/privacy}","received_events_url":"https://api.github.com/users/saiberz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-10T14:35:17Z","updated_at":"2015-12-10T15:32:01Z","closed_at":"2015-12-10T15:32:01Z","body":"Why do i get this error\r\n```App threw an error when running [TypeError: Cannot read property 'start' of undefined]```\r\n\r\ntrying to run:  ``` npm start```\r\n```js\r\nconst electron = require('electron');\r\nconst app = electron.app;  // Module to control application life.\r\nconst BrowserWindow = electron.BrowserWindow;  // Module to create native browser window.\r\napp.on('ready', function() {\r\n  // Create the browser window.\r\n  mainWindow = new BrowserWindow({width: 800, height: 600});\r\n\r\n  // and load the index.html of the app.\r\n  mainWindow.loadURL('file://' + __dirname + '/index.html');\r\n\r\n})\r\n```\r\n\r\nbut if use \r\n```js\r\nconst electron = require('electron');\r\nconst app = require('app');\r\nconst BrowserWindow = require('browser-window')\r\n```\r\nit works nice\r\n\r\nTested in:\r\nOSX El Capitan\r\nnode: v4.0.0 ^ npm: 2.14.2 ^     \"electron-prebuilt\": \"^0.35.4\"\r\nnode: v5.1.1 ^ npm: 3.3.12 ^     \"electron-prebuilt\": \"^0.35.4\""}}