Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I tried adding a web build --what do you think of this idea? #23

Open
iambumblehead opened this issue Jul 3, 2017 · 4 comments
Open

Comments

@iambumblehead
Copy link

I cloned FinanceReactNative then followed this guide to add a web build using react-native-web, alongside the android and ios builds.

When I tried to build the web version, many errors like these are printed by web pack

ERROR in ./~/react-native/Libraries/react-native/react-native.js
Module not found: Error: Cannot resolve module 'Clipboard' in /home/chris/software/FinanceReactNative/node_modules/react-native/Libraries/react-native
 @ ./~/react-native/Libraries/react-native/react-native.js 81:27-47

ERROR in ./~/react-native/Libraries/react-native/react-native.js
Module not found: Error: Cannot resolve module 'DatePickerAndroid' in /home/chris/software/FinanceReactNative/node_modules/react-native/Libraries/react-native
 @ ./~/react-native/Libraries/react-native/react-native.js 82:35-63

Do you think a web build for FinanceReactNative is feasable/desirable? I do not know if a web build is possible. What do you think?

@7kfpun
Copy link
Owner

7kfpun commented Jul 4, 2017

I was thinking about adding web support long time ago. I think it's nice and possible to do so as I did very little linking to native module. But you may have to deal with react-native-vector-icons a little bit.
https://github.com/oblador/react-native-vector-icons#web-with-webpack

@iambumblehead
Copy link
Author

I could push the additions that I made to a new branch here or to a clone using my profile. Would you welcome the creation of such a branch?

@7kfpun
Copy link
Owner

7kfpun commented Jul 4, 2017

Yes you could folk it first and make a pull request.
But keep in mind to keep to code clean.

@iambumblehead
Copy link
Author

iambumblehead commented Jul 7, 2017

@7kfpun I've made a new branch here named add-react-native-web. It does not build all the way, due to errors like these:

ERROR in ./~/react-native/Libraries/react-native/react-native.js
Module not found: Error: Cannot resolve module 'RCTDeviceEventEmitter' in /home/chris/software/FinanceReactNative/node_modules/react-native/Libraries/react-native
 @ ./~/react-native/Libraries/react-native/react-native.js 109:36-68

ERROR in ./~/react-native/Libraries/react-native/react-native.js
Module not found: Error: Cannot resolve module 'RCTNativeAppEventEmitter' in /home/chris/software/FinanceReactNative/node_modules/react-native/Libraries/react-native
 @ ./~/react-native/Libraries/react-native/react-native.js 110:39-74

similar errors are described in these react-native-web tickets, where the author replies "[...] react native internals you won't be able to use them on web"

Do you have advice or thoughts towards preparing a web build of Finance React Native?

clone and build my branch to see the errors I'm seeing

$ git clone https://github.com/iambumblehead/FinanceReactNative.git
$ cd FinanceReactNative
$ git checkout add-react-native-web
$ npm install
$ npm run web-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants