{"action":"created","issue":{"url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/4","repository_url":"https://api.github.com/repos/PaulLeCam/react-native-electron","labels_url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/4/comments","events_url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/4/events","html_url":"https://github.com/PaulLeCam/react-native-electron/issues/4","id":327808727,"node_id":"MDU6SXNzdWUzMjc4MDg3Mjc=","number":4,"title":"Error: Unresolved node modules: react-native","user":{"login":"ThaJay","id":9341747,"node_id":"MDQ6VXNlcjkzNDE3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/9341747?v=4","gravatar_id":"","url":"https://api.github.com/users/ThaJay","html_url":"https://github.com/ThaJay","followers_url":"https://api.github.com/users/ThaJay/followers","following_url":"https://api.github.com/users/ThaJay/following{/other_user}","gists_url":"https://api.github.com/users/ThaJay/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaJay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaJay/subscriptions","organizations_url":"https://api.github.com/users/ThaJay/orgs","repos_url":"https://api.github.com/users/ThaJay/repos","events_url":"https://api.github.com/users/ThaJay/events{/privacy}","received_events_url":"https://api.github.com/users/ThaJay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-30T16:34:51Z","updated_at":"2018-06-05T14:36:59Z","closed_at":"2018-06-05T14:36:59Z","author_association":"NONE","body":"Perhaps I'm in the wrong place here, excuse me if I am. This may also be more of a question than an issue.\r\nI also posted a stackoverflow question: https://stackoverflow.com/questions/50620640/electron-builder-tries-to-include-react-native-while-i-have-an-alias-set-in-webp\r\n\r\nWhen I try `yarn dist` as in \r\n```\r\n\"compile\": \"electron-webpack\", \r\n\"dist\": \"yarn compile && electron-builder\",\r\n```\r\nit errors out with\r\n```\r\nError: Unresolved node modules: react-native\r\n    at /media/dj/dev/scan-app-desktop/node_modules/electron-builder-lib/src/util/packageDependencies.ts:108:17\r\nFrom previous event:\r\n    at Collector.resolveUnresolvedHoisted (/media/dj/dev/scan-app-desktop/node_modules/electron-builder-lib/src/util/packageDependencies.ts:164:10)\r\n    at /media/dj/dev/scan-app-desktop/node_modules/electron-builder-lib/src/util/packageDependencies.ts:82:18\r\n    at Generator.next (<anonymous>)\r\n    at runCallback (timers.js:763:18)\r\n    at tryOnImmediate (timers.js:734:5)\r\n    at processImmediate (timers.js:716:5)\r\nFrom previous event:\r\n    at Collector.collect (/media/dj/dev/scan-app-desktop/node_modules/electron-builder-lib/src/util/packageDependencies.ts:84:6)\r\n    at /media/dj/dev/scan-app-desktop/node_modules/electron-builder-lib/out/util/packageDependencies.js:123:47\r\n    at Generator.next (<anonymous>)\r\n(...)\r\n```\r\n\r\nin my package.json I have the electronWebpack config:\r\n```\r\n  \"electronWebpack\": {\r\n    \"renderer\": {\r\n      \"webpackConfig\": \"webpack.renderer.additions.js\"\r\n    }\r\n  },\r\n```\r\nand in webpack.renderer.additions.js:\r\n```\r\nconst path = require('path')\r\n\r\nconst resolve = {\r\n  alias: {\r\n    'react-native': path.join(__dirname, 'node_modules/react-native-electron')\r\n  }\r\n}\r\n\r\nmodule.exports = {resolve}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/comments/394733899","html_url":"https://github.com/PaulLeCam/react-native-electron/issues/4#issuecomment-394733899","issue_url":"https://api.github.com/repos/PaulLeCam/react-native-electron/issues/4","id":394733899,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDczMzg5OQ==","user":{"login":"ThaJay","id":9341747,"node_id":"MDQ6VXNlcjkzNDE3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/9341747?v=4","gravatar_id":"","url":"https://api.github.com/users/ThaJay","html_url":"https://github.com/ThaJay","followers_url":"https://api.github.com/users/ThaJay/followers","following_url":"https://api.github.com/users/ThaJay/following{/other_user}","gists_url":"https://api.github.com/users/ThaJay/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaJay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaJay/subscriptions","organizations_url":"https://api.github.com/users/ThaJay/orgs","repos_url":"https://api.github.com/users/ThaJay/repos","events_url":"https://api.github.com/users/ThaJay/events{/privacy}","received_events_url":"https://api.github.com/users/ThaJay/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T14:36:58Z","updated_at":"2018-06-05T14:36:58Z","author_association":"NONE","body":"Turns out this was due to `electron-builder install-app-deps`, so this was not related to `react-native-electron` but `electron-webpack`. It checks dependencies in package.json and tries to include them with their subdependencies. So if I move the packages that are bundled by webpack to devDependencies it builds.\r\n\r\nThank you for trying to help and sorry for posting in the wrong place, I got a bit confused as to who does what exactly."}}
{"actor":{"display_login":"ThaJay"}}