{"action":"created","issue":{"url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/1","repository_url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example","labels_url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/1/comments","events_url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/1/events","html_url":"https://github.com/MillerGregor/rne-cross-platform-example/issues/1","id":313019555,"node_id":"MDU6SXNzdWUzMTMwMTk1NTU=","number":1,"title":"Hi, it's just a question","user":{"login":"MichelDiz","id":6570955,"node_id":"MDQ6VXNlcjY1NzA5NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/6570955?v=4","gravatar_id":"","url":"https://api.github.com/users/MichelDiz","html_url":"https://github.com/MichelDiz","followers_url":"https://api.github.com/users/MichelDiz/followers","following_url":"https://api.github.com/users/MichelDiz/following{/other_user}","gists_url":"https://api.github.com/users/MichelDiz/gists{/gist_id}","starred_url":"https://api.github.com/users/MichelDiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichelDiz/subscriptions","organizations_url":"https://api.github.com/users/MichelDiz/orgs","repos_url":"https://api.github.com/users/MichelDiz/repos","events_url":"https://api.github.com/users/MichelDiz/events{/privacy}","received_events_url":"https://api.github.com/users/MichelDiz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-10T17:28:48Z","updated_at":"2018-08-12T14:17:18Z","closed_at":null,"author_association":"NONE","body":"I've tested your implementation and it works perfectly. Now, I was wondering if it would be possible to have that same aproach with NextJS. They have a number of pre-shaped things including babel, webpack and others.\r\n\r\nPS. I'm interested in react-native-elements.\r\n\r\nI'm new to NextJS, but so far everything I've explored from them made me like it.\r\n\r\nI tried to formulate something with your configs but I always have some problem or another. See the example below - it's the last alley I got stuck.\r\n\r\nref: https://github.com/zeit/next.js/tree/canary/examples\r\n\r\nmore refs: \r\nhttps://github.com/zeit/next.js/issues/858#issuecomment-359195296\r\nhttps://spectrum.chat/thread/e055ef10-ea2f-4de6-8041-b4a2ca2f5e39\r\n\r\nexamples with RNW:\r\nhttps://github.com/aligos/next-rnw \r\nhttps://github.com/zeit/next.js/tree/canary/examples/with-react-native-web\r\n\r\nCheers\r\n\r\n```js\r\nError: Cannot find module 'ViewPropTypes'\r\n    at Function.Module._resolveFilename (module.js:555:15)\r\n    at Function.Module._load (module.js:482:25)\r\n    at Module.require (module.js:604:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.get ViewPropTypes [as ViewPropTypes] (/Volumes/HSierraDados/Dev-2018/PWA/AppPWA/node_modules/react-native/Libraries/react-native/react-native-implementation.js:119:32)\r\n    at Object.<anonymous> (/Volumes/HSierraDados/Dev-2018/PWA/AppPWA/node_modules/react-native-elements/src/config/ViewPropTypes.js:3:23)\r\n    at Module._compile (module.js:660:30)\r\n    at Object.Module._extensions..js (module.js:671:10)\r\n    at Module.load (module.js:573:32)\r\n    at tryModuleLoad (module.js:513:12) code: 'MODULE_NOT_FOUND' }\r\n{ Error: Cannot find module 'ViewPropTypes'\r\n    at Function.Module._resolveFilename (module.js:555:15)\r\n    at Function.Module._load (module.js:482:25)\r\n    at Module.require (module.js:604:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.get ViewPropTypes [as ViewPropTypes] (/Volumes/HSierraDados/Dev-2018/PWA/AppPWA/node_modules/react-native/Libraries/react-native/react-native-implementation.js:119:32)\r\n    at Object.<anonymous> (/Volumes/HSierraDados/Dev-2018/PWA/AppPWA/node_modules/react-native-elements/src/config/ViewPropTypes.js:3:23)\r\n    at Module._compile (module.js:660:30)\r\n    at Object.Module._extensions..js (module.js:671:10)\r\n    at Module.load (module.js:573:32)\r\n    at tryModuleLoad (module.js:513:12) code: 'MODULE_NOT_FOUND'\r\n```"},"comment":{"url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/comments/412345935","html_url":"https://github.com/MillerGregor/rne-cross-platform-example/issues/1#issuecomment-412345935","issue_url":"https://api.github.com/repos/MillerGregor/rne-cross-platform-example/issues/1","id":412345935,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjM0NTkzNQ==","user":{"login":"jimmyshen007","id":2237038,"node_id":"MDQ6VXNlcjIyMzcwMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2237038?v=4","gravatar_id":"","url":"https://api.github.com/users/jimmyshen007","html_url":"https://github.com/jimmyshen007","followers_url":"https://api.github.com/users/jimmyshen007/followers","following_url":"https://api.github.com/users/jimmyshen007/following{/other_user}","gists_url":"https://api.github.com/users/jimmyshen007/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyshen007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyshen007/subscriptions","organizations_url":"https://api.github.com/users/jimmyshen007/orgs","repos_url":"https://api.github.com/users/jimmyshen007/repos","events_url":"https://api.github.com/users/jimmyshen007/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyshen007/received_events","type":"User","site_admin":false},"created_at":"2018-08-12T14:17:18Z","updated_at":"2018-08-12T14:17:18Z","author_association":"NONE","body":"Encountered the same problem with next.js. The above error is because react-native-elements was trying to import from react-native instead of react-native-web. I didn't find a good way to change react-native-elements (the dependency of my project) import paths dynamically, but I tried re-transpile react-native-elements with a babel-plugin-module-resolver. Put the following into your node_modules/react-native-elements/.babelrc and run \"yarn\" & \"yarn run build:dist\" in react-native-elements.\r\n  \"plugins\": [\r\n    [\"module-resolver\", {\r\n      \"alias\": {\r\n        \"react-native\": \"react-native-web\",\r\n      }\r\n    }]\r\n  ]\r\n\r\nThe above can only solve the reac-native-web related issues. I was then stucked in a few other issues related to react-native-vector-icons. The following error is what I get:\r\n\r\nCannot convert undefined or null to object\r\nTypeError: Cannot convert undefined or null to object\r\n    at Function.keys (<anonymous>)\r\n    at Object.createIconSet [as default] (/App/node_modules/react-native-elements/node_modules/react-native-vector-icons/dist/lib/create-icon-set.js:1:3150)\r\n    at Object.<anonymous> (/App/node_modules/react-native-elements/node_modules/react-native-vector-icons/Octicons.js:6:68)\r\n    at Module._compile (module.js:652:30)\r\n    at Object.Module._extensions..js (module.js:663:10)\r\n    at Module.load (module.js:565:32)\r\n    at tryModuleLoad (module.js:505:12)\r\n    at Function.Module._load (module.js:497:3)\r\n    at Module.require (module.js:596:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (App/node_modules/react-native-elements/src/helpers/getIconType.js:2:1)\r\n    at Module._compile (module.js:652:30)\r\n    at Object.Module._extensions..js (module.js:663:10)\r\n    at Module.load (module.js:565:32)\r\n    at tryModuleLoad (module.js:505:12)\r\n    at Function.Module._load (module.js:497:3) \r\n\r\nI guess some import paths from react-native-elements to react-native-vector-icons was messed up. Probably we need to wait for some examples for next.js later on."}}
{"actor":{"display_login":"jimmyshen007"}}