{"action":"closed","issue":{"url":"https://api.github.com/repos/maximegris/angular-electron/issues/18","repository_url":"https://api.github.com/repos/maximegris/angular-electron","labels_url":"https://api.github.com/repos/maximegris/angular-electron/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/maximegris/angular-electron/issues/18/comments","events_url":"https://api.github.com/repos/maximegris/angular-electron/issues/18/events","html_url":"https://github.com/maximegris/angular-electron/issues/18","id":227681611,"number":18,"title":"Require 3rd party npm packages in main.js","user":{"login":"Clemens-B","id":18402007,"avatar_url":"https://avatars2.githubusercontent.com/u/18402007?v=3","gravatar_id":"","url":"https://api.github.com/users/Clemens-B","html_url":"https://github.com/Clemens-B","followers_url":"https://api.github.com/users/Clemens-B/followers","following_url":"https://api.github.com/users/Clemens-B/following{/other_user}","gists_url":"https://api.github.com/users/Clemens-B/gists{/gist_id}","starred_url":"https://api.github.com/users/Clemens-B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clemens-B/subscriptions","organizations_url":"https://api.github.com/users/Clemens-B/orgs","repos_url":"https://api.github.com/users/Clemens-B/repos","events_url":"https://api.github.com/users/Clemens-B/events{/privacy}","received_events_url":"https://api.github.com/users/Clemens-B/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-10T13:33:40Z","updated_at":"2017-05-11T17:13:00Z","closed_at":"2017-05-11T17:13:00Z","body":"Requiring 3rd party modules in electron's main.js results in an error messages \"Cannot find modle xy\" after building for a plattform and starting the application. For example I require nedb in main.js\r\n```Javascript\r\n//Require nedb here to make sure we have a file instead of IndexDB\r\nconst Datastore = require('nedb'),\r\n    db = new Datastore({ filename: path.join(app.getPath('userData'), './data.db'), autoload: true });\r\nglobal.datastore = db;\r\n```\r\n\r\nTo solve this I run `npm install` in the /dist folder. Maybe there is a better solution? "}}
{"actor":{"display_login":"maximegris"}}