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
Incompatibility issue with react-native-elements #9
Comments
@tgehrs I am the maintainer of React Native Elements. I think this issue would be more relevant on our repo. This is because in a few of our components, we are defaulting to MaterialIcons at the root and that's the import statement you are seeing above. I think the fix for this would be to just import from 'react-native-vector-icons` and handle the type dynamically like we are doing for our other components. If you wanna open an issue on our repo, I can make sure we push a fix for it asap. |
@tgehrs I tried using the SearchBar and Button which do what you are saying but I am not seeing any issue can you maybe provide some code snippet to help us debug it? |
@tgehrs @binoy14 are you following this guide? https://github.com/react-native-training/react-native-elements/blob/master/using-with-crna-or-expo.md |
Thanks so much for taking the time to look into this. I went ahead and made a new CRNA app and was unable to reproduce this issue, even when matching the same dependencies and sdkVersion in my project that was having this issue it persists. @dikaiosune yes I did follow those steps @binoy14 if you want to take a look i've added you as a collaborator on the repo that is giving me issues app.json
package.json dependencies
|
@tgehrs one thing that jumps out to me is that your package.json includes react-native-svg, when I believe you want to be using the vendored copy that comes with the SDK: https://docs.expo.io/versions/v14.0.0/sdk/svg.html |
@dikaiosune thanks for pointing that out (i am very much a novice in this space) uninstalling react-native-svg did not affect the error |
@tgehrs can you paste the contents of your |
@dikaiosune here you go, thanks again for taking time to help with this. I manually changed it to match the project without the exception, then re-installed the node modules but the exception still remains. I will give you access to the repo this is happening in as well. Also I understand if this looks to you like a personal problem issue needs to be closed project with exception:
project w/o exception:
|
Yeah, that'll do it! |
@dikaiosune - |
@dikaiosune @brentvatne woohoo! so is it just the old version of CRNA that I used did not include that? |
@tgehrs - that should have been in the old version too! the source of babel-preset-expo is:
|
@brentvatne Thanks for getting to the bottom of this! |
When I attempt to add react-native-elements to my expo project (specifically working with the List component), it gives an error that fontFamily 'Material Icons' is not a system font:
It can easily be resolved by switching the imports within react-native-elements to point to this package, for example:
change this
import MaterialIcon from 'react-native-vector-icons/MaterialIcons'
to
import MaterialIcon from '@expo/vector-icons/MaterialIcons'
Is there an official (or better) way to do this? I am new to expo/RN and was unable to find any documentation
The text was updated successfully, but these errors were encountered: