Expo react-native-svg throws error in development build

Please provide the following:

  1. SDK Version: 49.0.10
  2. Platforms(Android/iOS/web/all): IOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

The error i get when trying to run my svg code on IOS is:
“Invariant Violation: requireNativeComponent: “RNSVGRect” was not found in the UIManager”

The following is my package.json:

{
  "name": "adhd_mood",
  "version": "1.1.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-async-storage/async-storage": "1.18.2",
    "@react-native-community/slider": "4.4.2",
    "@react-navigation/bottom-tabs": "^6.5.8",
    "@react-navigation/native": "^6.1.7",
    "expo": "~49.0.10",
    "expo-dev-client": "~2.4.10",
    "expo-status-bar": "~1.6.0",
    "react": "18.2.0",
    "react-native": "0.72.4",
    "react-native-root-toast": "^3.5.1",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-swiper": "^1.6.0",
    "react-native-toast-message": "^2.1.6",
    "react-native-svg": "13.9.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

I already checked if the dependencies fit together with the expo doctor. Reset the cache when starting the project. Delete node modules and install again. checked a different ios simulator.

I used only this minimal example to make sure the problem occurs with even the most basic code:

<Svg height='50%' width='50%' viewBox='0 0 100 100'>
						<Circle
							cx='50'
							cy='50'
							r='45'
							stroke='blue'
							strokeWidth='2.5'
							fill='green'
						/>
						<Rect
							x='15'
							y='15'
							width='70'
							height='70'
							stroke='red'
							strokeWidth='2'
							fill='yellow'
						/>
					</Svg>

Does anyone have an idea what the problem could be? In expo go it works fine but when i switch to development build (by switching to it with s in the console" it gives me this error. Crashes on Phone with Testflight.

I would be extremely appreciative, as i’ve been looking for solutions for days. I work on a Mac M1 machine

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.