1

I am new to React Native and I am trying to build a simple hello world of charting with react-native-chart-kit on macOS.

I keep getting these Component Exception errors that I can't figure out how to resolve after much googling.

Any help here would be much appreciated.

[email protected] /Users/xkenneth/Work/myTestReactApp
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
  └── [email protected] deduped
[Sat Jul 24 2021 08:29:30.511]  ERROR    Invariant Violation: requireNativeComponent: "RNSVGGroup" was not found in the UIManager.

This error is located at:
    in RNSVGGroup (at G.tsx:33)
    in G (at LineChart.js:420)
    in RNSVGGroup (at G.tsx:33)
    in G (at LineChart.js:376)
    in RNSVGGroup (at G.tsx:33)
    in G (at Svg.tsx:202)
    in RNSVGSvgView (at Svg.tsx:197)
    in Svg (at LineChart.js:372)
    in RCTView (at View.js:44)
    in View (at LineChart.js:371)
    in LineChart (at App.js:73)
    in RCTView (at View.js:44)
    in View (at App.js:71)
    in RCTView (at View.js:44)
    in View (at App.js:57)
    in RCTScrollContentView (at ScrollView.js:1224)
    in RCTScrollView (at ScrollView.js:1369)
    in ScrollView (at ScrollView.js:1395)
    in ScrollView (at App.js:48)
    in RCTView (at View.js:44)
    in View (at SafeAreaView.js:42)
    in ForwardRef(SafeAreaView) (at App.js:47)
    in App (at renderApplication.js:45)
    in RCTView (at View.js:44)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:44)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)

enter image description here

2
  • github.com/capitalone/react-native-pathjs-charts/issues/102 Commented Jul 24, 2021 at 13:41
  • @MarekH I am having trouble following that thread and figuring out what to do. Manual linking seems to have been replaced with auto-linking in the latest React Native and the packages I have are many versions ahead of what are shown in that GitHub link. Commented Jul 24, 2021 at 13:57

1 Answer 1

1

Ok, I figured it out. My specified version of macOS was too low.

I had to change it from 10.13 to 10.14 in my Podfile and then do "pod install" and it resolved!

Sign up to request clarification or add additional context in comments.

2 Comments

Interesting. Does it mean that you were able to use react-native-svg (which seems to be used by react-native-chart-kit) on MacOS? There were actually some open issues in the repo requesting MacOS support: github.com/react-native-svg/react-native-svg/issues/297 github.com/react-native-svg/react-native-svg/issues/1426 github.com/react-native-svg/react-native-svg/pull/1632 If you can already use it out of the box then it's great.
Oh, it indeed worked out of the box after I ran pod install (the build target in my case is already 10.14). Thanks for the tip!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.