react-native-chart-kit: `expo start --dev-client`: Invariant Violation: requireNativeComponent: "RNSVGRect" was not found in the UIManager
Note: see https://github.com/indiespirit/react-native-chart-kit/issues/614#issuecomment-1419656489 for steps to resolve
When running with
expo start
— ✅ The basic sampleLineChart
renders fineexpo start --dev-client
❌ — The app crashes with ~42 errors like-
Invariant Violation: requireNativeComponent: “RNSVGRect” was not found in the UIManager
-
"expo": "~45.0.0",
"react-native-chart-kit": "^6.12.0",
I tried following the steps in these other issues, with no success
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21
Maybe you have forgot to install ‘react-native-svg’ as mentioned in the document.
Maybe safe to close, with action item to update the README
I eventually got around this by publishing a new dev-client build
eas build --profile development --platform ios
Would be nice to have some docs for this gotcha!
Deleting the development client on my android and creating a new one with
eas build --profile development --platform android
did the trick for me. I guess react-native-svg contains some native code API, probably why we need a new build after downloading it.@thiskevinwang - the steps you gave in
https://github.com/indiespirit/react-native-chart-kit/issues/614#issuecomment-1419656489
worked for me
thanks for quick reply @thiskevinwang
no, i will try that.
yes, i am running
eas build --profile development --platform ios
I guess I will find out when I prebuild
EDIT:
I read through the docs and am not entirely sure why I need to prebuild…
You can try uninstall your app from the emulator/device and try rebuild it again.
expo prebuild
did nothing butnpx react-native run-ios
solved issue for meClosing this as the steps in https://github.com/indiespirit/react-native-chart-kit/issues/614#issuecomment-1419656489 were confirmed working by @bewallyt
It’s been a long time since I’ve touched this, but has everyone/anyone tried the following commands?