{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/electron-config/issues/1","repository_url":"https://api.github.com/repos/sindresorhus/electron-config","labels_url":"https://api.github.com/repos/sindresorhus/electron-config/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/electron-config/issues/1/comments","events_url":"https://api.github.com/repos/sindresorhus/electron-config/issues/1/events","html_url":"https://github.com/sindresorhus/electron-config/issues/1","id":166699572,"number":1,"title":"Crash when running as a packaged app with electron-builder on macOS","user":{"login":"jwheare","id":49224,"avatar_url":"https://avatars.githubusercontent.com/u/49224?v=3","gravatar_id":"","url":"https://api.github.com/users/jwheare","html_url":"https://github.com/jwheare","followers_url":"https://api.github.com/users/jwheare/followers","following_url":"https://api.github.com/users/jwheare/following{/other_user}","gists_url":"https://api.github.com/users/jwheare/gists{/gist_id}","starred_url":"https://api.github.com/users/jwheare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwheare/subscriptions","organizations_url":"https://api.github.com/users/jwheare/orgs","repos_url":"https://api.github.com/users/jwheare/repos","events_url":"https://api.github.com/users/jwheare/events{/privacy}","received_events_url":"https://api.github.com/users/jwheare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-20T22:43:05Z","updated_at":"2016-07-20T23:48:36Z","closed_at":null,"body":"```\r\nUncaught Exception:\r\nTypeError: Expected string, got undefined\r\n    at module.exports.name ([...]IRCCloud.app/Contents/Resources/app.asar/node_modules/env-paths/index.js:49:9)\r\n    at ElectronConfig.Conf ([...]IRCCloud.app/Contents/Resources/app.asar/node_modules/conf/index.js:29:9)\r\n    at ElectronConfig ([...]IRCCloud.app/Contents/Resources/app.asar/node_modules/electron-config/index.js:11:3)\r\n    at setupConfig ([...]IRCCloud.app/Contents/Resources/app.asar/main.js:56:10)\r\n    at Object.<anonymous> ([...]IRCCloud.app/Contents/Resources/app.asar/main.js:60:16)\r\n    at Module._compile (module.js:541:32)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:456:32)\r\n    at tryModuleLoad (module.js:415:12)\r\n    at Function.Module._load (module.js:407:3)\r\n```\r\n\r\n[env-paths](https://github.com/sindresorhus/env-paths/blob/7c516d0755ab2eb9212f4327e047afe036b5bfd2/index.js#L49) expects a String, but [conf](https://github.com/sindresorhus/conf/blob/cffd7b58d6245c0f0c2e8b92d8bc45a4caf52a00/index.js#L29) is passing in an undefined `opts.projectName`, because [electron-config](https://github.com/sindresorhus/electron-config/blob/61e80b5242f147868ffcebc410838efec2bf17e0/index.js#L8) is setting `opts.cwd` directly so it isn't needed.\r\n\r\nThis fails because the package.json isn't bundled into the asar file when built, so pkg-up finds nothing.\r\n\r\nNot sure which package this should be fixed in.\r\n\r\n----\r\n\r\nAlso, a fresh npm install results in this version tree:\r\n\r\n```\r\n└─┬ electron-config@0.2.1\r\n  └─┬ conf@0.11.1\r\n    └── env-paths@0.2.0\r\n```\r\n\r\nconf depends on env-paths: ^0.2.0 which won't allow 0.3.0"},"comment":{"url":"https://api.github.com/repos/sindresorhus/electron-config/issues/comments/234118084","html_url":"https://github.com/sindresorhus/electron-config/issues/1#issuecomment-234118084","issue_url":"https://api.github.com/repos/sindresorhus/electron-config/issues/1","id":234118084,"user":{"login":"jwheare","id":49224,"avatar_url":"https://avatars.githubusercontent.com/u/49224?v=3","gravatar_id":"","url":"https://api.github.com/users/jwheare","html_url":"https://github.com/jwheare","followers_url":"https://api.github.com/users/jwheare/followers","following_url":"https://api.github.com/users/jwheare/following{/other_user}","gists_url":"https://api.github.com/users/jwheare/gists{/gist_id}","starred_url":"https://api.github.com/users/jwheare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwheare/subscriptions","organizations_url":"https://api.github.com/users/jwheare/orgs","repos_url":"https://api.github.com/users/jwheare/repos","events_url":"https://api.github.com/users/jwheare/events{/privacy}","received_events_url":"https://api.github.com/users/jwheare/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T23:48:36Z","updated_at":"2016-07-20T23:48:36Z","body":"Perhaps your path-exists isn't taking advantage of electron's patched fs calls that allow asar traversal:\r\n\r\nhttps://github.com/electron/electron/blob/master/docs/tutorial/application-packaging.md#using-asar-archives"}}
{"actor":{"display_login":"jwheare"}}