Solvedreact native svg charts TypeError: method.bind is not a function Issue with react native 0.59.0

What is the problem?

Getting TypeError:

ExceptionsManager.js:74 TypeError: method.bind is not a function

This error is located at:
    in Path (at animated-path.js:72)
    in AnimatedPath (at chart.js:119)
    in RNSVGSvgView (at Svg.js:83)
    in Svg (at chart.js:110)
    in RCTView (at View.js:45)
    in View (at chart.js:107)
    in RCTView (at View.js:45)
    in View (at chart.js:106)
    in Chart (at Challenge.js:112)
    in RCTView (at View.js:45)
    in View (at Challenge.js:75)
    in Challenge (at withCharts.js:186)
    in _temp (created by SceneView)
    in SceneView (at StackViewLayout.js:795)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.js:69)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:860)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at StackViewLayout.js:311)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.js:307)
    in PanGestureHandler (at StackViewLayout.js:300)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.js:79)
    in RCTView (at View.js:45)
    in View (at Transitioner.js:215)
    in Transitioner (at StackView.js:22)
    in StackView (created by Navigator)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (created by SceneView)
    in SceneView (at StackViewLayout.js:795)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.js:69)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.js:57)
    in Card (at createPointerEventsContainer.js:27)
    in Container (at StackViewLayout.js:860)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at StackViewLayout.js:311)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.js:307)
    in PanGestureHandler (at StackViewLayout.js:300)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.js:79)
    in RCTView (at View.js:45)
    in View (at Transitioner.js:215)
    in Transitioner (at StackView.js:22)
    in StackView (created by Navigator)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (created by SceneView)
    in SceneView (created by SwitchView)
    in SwitchView (created by Navigator)
    in Navigator (at createAppContainer.js:388)
    in NavigationContainer (at routes.js:109)
    in Routes (at App.js:51)
    in RCTView (at View.js:45)
    in View (at App.js:49)
    in App (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)

When does it happen?

I'm using AreaChart in my App and when I remove it error is not there.

What platform?

  • [ x ] iOS
  • Android (Not checked)

React Native version: 0.59.0

16 Answers

✔️Accepted Answer

@vikrantnegi i solved my problem:
I updated to react-native-svg 9.3.3
react-native start --reset-cache and it worked.

Other Answers:

@nethergrim Try updating the react-native-svg package to the latest version. It solved the problem for me.

I've got similar error with:
"react": "16.8.3",
"react-native": "^0.59.0",
"react-native-svg": "7.1.2",
"react-native-svg-charts": "5.2.0"

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 chart.js:110)
    in RCTView (at View.js:45)
    in View (at chart.js:107)
    in RCTView (at View.js:45)
    in View (at chart.js:106)
    in Chart (at SaldoAndamentaleChart.js:201)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at SaldoAndamentaleChart.js:200)
    in RCTView (at View.js:45)
    in View (at SaldoAndamentaleChart.js:199)
    in SaldoAndamentaleChart (at CardConto.js:82)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at CardConto.js:80)
    in RCTView (at View.js:45)
    in View (at ImageBackground.js:63)
    in ImageBackground (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(ImageBackground))
    in Styled(ImageBackground) (at CardConto.js:78)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at CardConto.js:77)
    in TouchableWithoutFeedback (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(TouchableWithoutFeedback))
    in Styled(TouchableWithoutFeedback) (at CardConto.js:76)
    in CardConto (at withSpinner.js:43)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withSpinner.js:42)
    in withSpinner(CardConto) (created by Connect(withSpinner(CardConto)))
    in Connect(withSpinner(CardConto)) (created by Connect(Connect(withSpinner(CardConto))))
    in Connect(Connect(withSpinner(CardConto))) (at RapportiCarousel.js:69)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at RapportiCarousel.js:68)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at Carousel.js:1178)
    in RCTView (at View.js:45)
    in View (at VirtualizedList.js:1741)
    in CellRenderer (at VirtualizedList.js:688)
    in RCTScrollContentView (at ScrollView.js:953)
    in RCTScrollView (at ScrollView.js:1092)
    in ScrollView (at VirtualizedList.js:1065)
    in VirtualizedList (at FlatList.js:632)
    in FlatList (at createAnimatedComponent.js:151)
    in AnimatedComponent (at Carousel.js:1308)
    in Carousel (at RapportiCarousel.js:121)
    in RCTView (at View.js:45)
    in View (at Tips.js:361)
    in RCTView (at View.js:45)
    in View (at Tips.js:356)
    in Tips (at TipsContainer.js:62)
    in TipsContainer (created by Connect(TipsContainer))
    in Connect(TipsContainer) (at RapportiCarousel.js:115)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at RapportiCarousel.js:114)
    in RapportiCarousel (created by Connect(RapportiCarousel))
    in Connect(RapportiCarousel) (at DashboardScreen.js:176)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at DashboardScreen.js:168)
    in RCTScrollContentView (at ScrollView.js:953)
    in RCTScrollView (at ScrollView.js:1092)
    in ScrollView (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(ScrollView))
    in Styled(ScrollView) (at DashboardScreen.js:156)
    in DashboardScreen (at withPendingRequests.js:62)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withPendingRequests.js:61)
    in withPendingRequests(DashboardScreen) (at withSCA.js:358)
    in withSCA(withPendingRequests(DashboardScreen)) (created by Connect(withSCA(withPendingRequests(DashboardScreen))))
    in Connect(withSCA(withPendingRequests(DashboardScreen))) (created by Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))
    in Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))) (at withPushHandler.js:109)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withPushHandler.js:108)
    in withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))) (created by Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))
    in Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))) (at withSpinner.js:43)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withSpinner.js:42)
    in withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))) (created by Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))))
    in Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))) (created by Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))
    in Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))) (at withTab.js:87)
    in RCTView (at View.js:45)
    in View (created by Context.Consumer)
    in StyledNativeComponent (created by Styled(View))
    in Styled(View) (at withTab.js:86)
    in withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen)))))))))) (created by Connect(withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))))
    in Connect(withTab(Connect(Connect(withSpinner(Connect(withPushHandler(Connect(Connect(withSCA(withPendingRequests(DashboardScreen))))))))))) (at ComponentWrapper.js:29)
    in WrappedComponent (at ComponentWrapper.js:45)
    in Provider (at ComponentWrapper.js:44)
    in ReduxWrapper (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)

<unknown>
    Shape.js:9:24
<unknown>
    lodash.js:4911:23
baseForOwn
    lodash.js:2996:31
<unknown>
    lodash.js:4880:26
forEach
    lodash.js:9344:18
Shape
    Shape.js:8:18
Svg
    Svg.js:53:8
constructClassInstance
    ReactNativeRenderer-dev.js:7324:26
updateClassComponent
    ReactNativeRenderer-dev.js:11479:6
performUnitOfWork
    ReactNativeRenderer-dev.js:17276:21
workLoop
    ReactNativeRenderer-dev.js:17316:41
renderRoot
    ReactNativeRenderer-dev.js:17417:15
performWorkOnRoot
    ReactNativeRenderer-dev.js:18423:17
performWork
    ReactNativeRenderer-dev.js:18324:24
performSyncWork
    ReactNativeRenderer-dev.js:18285:14
batchedUpdates$1
    ReactNativeRenderer-dev.js:18531:21
batchedUpdates
    ReactNativeRenderer-dev.js:2611:31
_receiveRootNodeIDEvent
    ReactNativeRenderer-dev.js:2706:17
receiveEvent
    ReactNativeRenderer-dev.js:2726:26
__callFunction
    MessageQueue.js:366:47
<unknown>
    MessageQueue.js:106:26
__guard
    MessageQueue.js:314:10
callFunctionReturnFlushedQueue
    MessageQueue.js:105:17

@marcorm It didn't solve my problem. I'm still having the issue. Reset cache not working for me.

Had the same issue and @vikrantnegi fix worked. I updated react-native-svg to 9.3.7

More Issues: