indiespirit / react-native-chart-kit

📊React Native Chart Kit: Line Chart, Bezier Line Chart, Progress Ring, Bar chart, Pie chart, Contribution graph (heatmap)
https://expo.io/@indiespirit/react-native-chart-kit
MIT License
2.85k stars 658 forks source link

expo managed app: ERROR Invariant Violation: requireNativeComponent: "RNSVGSvgViewAndroid" was not found in the UIManager. #698

Open jianrontan opened 1 year ago

jianrontan commented 1 year ago

I'm trying to use StackedBarChart but I keep getting this error, any way around it? I heard here and there that it might be due to my app being expo managed, but I do not want to eject expo as I need to for my app development.

package.json:
{
  "name": "app",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-community/slider": "^4.4.2",
    "@react-navigation/drawer": "^6.6.3",
    "@react-navigation/native": "^6.1.7",
    "@react-navigation/native-stack": "^6.9.13",
    "@reduxjs/toolkit": "^1.9.5",
    "@types/react": "~18.0.27",
    "axios": "^1.4.0",
    "expo": "^48.0.19",
    "expo-app-loading": "^2.1.1",
    "expo-constants": "~14.2.1",
    "expo-device": "~5.2.1",
    "expo-font": "~11.1.1",
    "expo-linking": "~4.0.1",
    "expo-notifications": "~0.18.1",
    "expo-router": "^1.2.0",
    "expo-splash-screen": "~0.18.1",
    "expo-status-bar": "~1.4.2",
    "firebase": "^10.0.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.8",
    "react-native-calendar-picker": "^7.1.4",
    "react-native-chart-kit": "^6.12.0",
    "react-native-countdown-circle-timer": "^3.2.1",
    "react-native-countdown-component": "^2.7.1",
    "react-native-dotenv": "^3.4.9",
    "react-native-elements": "^3.4.3",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-modal-dropdown": "^1.0.2",
    "react-native-notifications": "^5.0.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-select-dropdown": "^3.3.4",
    "react-native-stopwatch-timer": "github:jianrontan/react-native-stopwatch-timer",
    "react-native-switch": "^1.5.1",
    "react-native-switch-toggle": "^2.2.1",
    "react-native-web": "~0.18.7",
    "react-redux": "^8.1.1",
    "redux": "^4.2.1",
    "redux-thunk": "^2.4.2",
    "typescript": "^4.9.4"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react-native-calendar-picker": "^7.0.3"
  },
  "private": true
}

Full error: ` ERROR Invariant Violation: requireNativeComponent: "RNSVGSvgViewAndroid" was not found in the UIManager.

This error is located at: in RNSVGSvgViewAndroid (created by Svg) in Svg (created by StackedBarChart) in RCTView (created by View) in View (created by StackedBarChart) in StackedBarChart (created by Statistics) in RCTView (created by View) in View (created by Statistics) in RCTView (created by View) in View (created by ScrollView) in RCTScrollView (created by ScrollView) in ScrollView (created by ScrollView) in ScrollView (created by Statistics) in RCTView (created by View) in View (created by Statistics) in Statistics (created by SceneView) in StaticContainer in EnsureSingleNavigator (created by SceneView) in SceneView (created by Drawer) in RCTView (created by View) in View (created by Screen) in RCTView (created by View) in View (created by Background) in Background (created by Screen) in Screen (created by Drawer) in RNSScreen (created by AnimatedComponent) in AnimatedComponent in AnimatedComponentWrapper (created by InnerScreen) in Suspender (created by Freeze) in Suspense (created by Freeze) in Freeze (created by DelayedFreeze) in DelayedFreeze (created by InnerScreen) in InnerScreen (created by Screen) in Screen (created by MaybeScreen) in MaybeScreen (created by Drawer) in RNSScreenContainer (created by ScreenContainer) in ScreenContainer (created by MaybeScreenContainer) in MaybeScreenContainer (created by Drawer) in RCTView (created by View) in View (created by Drawer) in RCTView (created by View) in View (created by AnimatedComponent(View)) in AnimatedComponent(View) in Unknown (created by Drawer) in RCTView (created by View) in View (created by AnimatedComponent(View)) in AnimatedComponent(View) in Unknown (created by PanGestureHandler) in PanGestureHandler (created by Drawer) in Drawer (created by DrawerViewBase) in DrawerViewBase (created by DrawerView) in RNGestureHandlerRootView (created by GestureHandlerRootView) in GestureHandlerRootView (created by DrawerView) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaInsetsContext) in SafeAreaProviderCompat (created by DrawerView) in DrawerView (created by DrawerNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by DrawerNavigator) in DrawerNavigator (created by NavStack) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by NavStack) in NavStack (created by RootNavigation) in RootNavigation (created by App) in ThemeProvider (created by App) in Provider (created by App) in App (created by withDevTools(App)) in withDevTools(App) in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in main(RootComponent), js engine: hermes`

kyadalu1 commented 1 year ago

https://www.youtube.com/watch?v=3okXriDEB44