react-native-vector-icons: Crashes in Release mode on 0.56.0
I’m having some insanely strange bug, that I think is related to http://babeljs.io/docs/en/babel-plugin-transform-class-constructor-call being removed in @babel 7
I’ve spent all day trying to debug this, and it comes down to the icons. As soon as I remove all calls to <Icon ... />, the app works again.
This is with: Xcode: 9.4 OS: MacOS High Sierra
This happens on Android too, so this is most likely a problem with transpiling one way or another. Icons are linked properly, and debug mode works fine. This is with all babel dependencies forced to 7.0.beta47. It crashes with the following message:
2018-07-31 01:55:28.772888+0200 App[645:152282] { [TypeError: TypeError: TypeError: TypeError: undefined is not an object (evaluating '_getPrototypeOf2.default')
This error is located at:
in Icon
in RCTView
in RCTView
in TouchableHighlight
in IconButton
in RCTView
in RCTView
in KeyboardAvoidingView
in RCTView
in AnimatedComponent
in withAnimatable(Component)
in BVLinearGradient
in LinearGradient
in LoginScreen
in Auth0Consumer
in UserConsumer
in SceneView
in RCTView
in AnimatedComponent
in Card
in Container
in RCTView
in RCTView
in StackViewLayout
in withOrientation
in RCTView
in Transitioner
in StackView
in Navigator
in KeyboardAwareNavigator
in NavigationContainer
in SceneView
in SwitchView
in Navigator
in NavigationContainer
in UserConsumer
in RCTView
in WebProvider
in PaymentsProvider
in Mutation
in Apollo(PaymentsProvider)
in UserProvider
in Mutation
in Apollo(UserProvider)
in Mutation
in Apollo(Apollo(UserProvider))
in Query
in Apollo(Apollo(Apollo(UserProvider)))
in Auth0Consumer
in OneSignalConsumer
in CacheConsumer
in OneSignalProvider
in ApolloProvider
in GraphQLProvider
in AuthorizedFetchConsumer
in FetchProvider
in CacheConsumer
in CacheProvider
in Auth0Consumer
in Auth0Provider
in RootContainer
in App
in RCTView
in RCTView
in AppContainer
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 19
Holy shit! It works! Thank you @jrnk!
If anybody else runs into this, this is what I’ve done:
1. Updated .babelrc to this:
2. package.json has this:
3. index.js
Same here,
TypeError · TypeError: undefined is not an object (evaluating 'e.default') This error is located at: in r in Styled(r) in RCTViewMy stacktrace pinpoints it atnode_modules/react-native-vector-icons/lib/create-icon-set.js:21:70@fahidmohammad you need to have
.babelrcsplit in dev/production like here https://github.com/oblador/react-native-vector-icons/issues/801#issuecomment-409268915Alsop keep
@babel/*vesions to7.0.0-beta.47@Amnesthesia not yet. Will post here if I do of course. I’m also pretty confident it’s a babel 7 transpiling issue; Not yet sure which one though 😃