react-native-svg: Upgrade to react-native 0.59 breaks react-native-svg
Steps: Upgrade to react-native 0.59.0, build and run App, and get the following:
TypeError: method.bind is not a function. (In 'method.bind((0, _assertThisInitialized2.default)(_this))', 'method.bind' is undefined)
This error is located at:
in Svg (at NumberCircle.js:7)
in NumberCircle (at Overview.js:12)
in RCTView (at View.js:45)
in View (at Overview.js:10)
in Overview (at LandingScreen.js:238)
in RCTView (at View.js:45)
in View (at LandingScreen.js:237)
in RCTView (at View.js:45)
in View (at LandingScreen.js:220)
in LandingScreen (at SceneView.js:9)
in SceneView (at StackViewLayout.js:574)
in RCTView (at View.js:45)
in View (at createAnimatedComponent.js:151)
in AnimatedComponent (at StackViewCard.js:12)
in Card (at createPointerEventsContainer.js:28)
in Container (at StackViewLayout.js:612)
in RCTView (at View.js:45)
in View (at StackViewLayout.js:470)
in RCTView (at View.js:45)
in View (at StackViewLayout.js:469)
in StackViewLayout (at withOrientation.js:30)
in withOrientation (at StackView.js:63)
in RCTView (at View.js:45)
in View (at Transitioner.js:169)
in Transitioner (at StackView.js:21)
in StackView (at createNavigator.js:59)
in Navigator (at createKeyboardAwareNavigator.js:11)
in KeyboardAwareNavigator (at createNavigationContainer.js:376)
in NavigationContainer (at App.js:60)
in RCTView (at View.js:45)
in View (at Root.js:13)
in Root (at connectStyle.js:384)
in Styled(Root) (at App.js:59)
in Sidekick (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)
...
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 20
also had missing “RNSVGVectorEffect.h” downgrading to 9.2.4 worked for me
@marcorm I think something like the following should help: rm -rf node_modules npm install npm start – --reset-cache
none of these suggestions worked on Android
I upgraded react-native-svg from 8.0.10 to 9.3.3 and was able to build it for iOS. Since it appears to have been either an issue with an older version of r-n-svg or an issue with clearing out caches while upgrading I am closing this for now.
@teekirol Can you make a reproduction?
Should be enough to link the new files after upgrading.
Here the svg is working but I’m using only Svg and Polygon components from it, try to clean your gradle cache, remove your node modules and gradlew --stop to see if it works.
I found one way to make it work for iOS:
Hope this helps some people until this get’s fixed in a new build
@tehOPEologist I had the same issue and ended up downgrading react-native-svg to 9.2.4
@tehOPEologist try relinking (unlink and link again)