-
Notifications
You must be signed in to change notification settings - Fork 5
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
Hi, it's just a question #1
Comments
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. The 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: Cannot convert undefined or null to object I 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. |
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.
PS. I'm interested in react-native-elements.
I'm new to NextJS, but so far everything I've explored from them made me like it.
I 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.
ref: https://github.com/zeit/next.js/tree/canary/examples
more refs:
vercel/next.js#858 (comment)
https://spectrum.chat/thread/e055ef10-ea2f-4de6-8041-b4a2ca2f5e39
examples with RNW:
https://github.com/aligos/next-rnw
https://github.com/zeit/next.js/tree/canary/examples/with-react-native-web
Cheers
The text was updated successfully, but these errors were encountered: