react-native-svg
react-native-svg copied to clipboard
Invariant Violation: requireNativeComponent: "RNSVGPath" was not found in the UIManager.
ERROR Invariant Violation: requireNativeComponent: "RNSVGPath" was not found in the UIManager.
This error is located at: in RNSVGPath (created by Path) in Path (created by EyeComponent) in RNSVGGroup (created by G) in G (created by Svg) in RNSVGSvgViewAndroid (created by Svg) in Svg (created by EyeComponent) in RCTView (created by View) in View (created by EyeComponent) in EyeComponent (created by TextInputComponent) in RCTView (created by View) in View in Unknown (created by TouchableOpacity) in TouchableOpacity (created by TouchableOpacity) in TouchableOpacity (created by TextInputComponent) in RCTView (created by View) in View (created by TextInputComponent) in TextInputComponent (created by Login) in RCTView (created by View) in View (created by Login) in RCTView (created by View) in View (created by Login) in Login (created by SceneView) in StaticContainer in EnsureSingleNavigator (created by SceneView) in SceneView (created by SceneView) in RCTView (created by View) in View (created by DebugContainer) in DebugContainer (created by MaybeNestedStack) in MaybeNestedStack (created by SceneView) in RCTView (created by View) in View (created by SceneView) in RNSScreen in Unknown (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 SceneView) in SceneView (created by NativeStackViewInner) in Suspender (created by Freeze) in Suspense (created by Freeze) in Freeze (created by DelayedFreeze) in DelayedFreeze (created by ScreenStack) in RNSScreenStack (created by ScreenStack) in ScreenStack (created by NativeStackViewInner) in NativeStackViewInner (created by NativeStackView) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaProviderCompat) in SafeAreaProviderCompat (created by NativeStackView) in NativeStackView (created by NativeStackNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by NativeStackNavigator) in NativeStackNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in ratingstar(RootComponent), js engine: hermes
This may help as it may be related - https://github.com/software-mansion/react-native-svg/issues/2235#issuecomment-2069532093
I faced the same issue on android the APK install crashes when i access a screen where i used import { LocalSvg } from 'react-native-svg/css';
(react-native-svg v14 with expo) so i downgraded to 13.14.1 & updated the import back to import { LocalSvg } from 'react-native-svg';
and it is working fine rn.
component where i used LocalSvg:
import { styled } from 'nativewind';
import React from 'react';
import { StyleProp, Text, View, ViewStyle } from 'react-native';
import { LocalSvg } from 'react-native-svg';
import { icons } from '@/shared/icons';
export type CustomIconProps = {
name: keyof typeof icons;
size?: number;
color?: string;
style?: StyleProp<ViewStyle>;
};
const CustomIcon = ({ name, size = 24, color = 'black', style }: CustomIconProps) => {
const icon = icons[name];
if (!icon) {
return (
<View style={style}>
<Text>{name} not found</Text>
</View>
);
}
return (
<LocalSvg
width={size}
height={size}
asset={icon}
fill={color}
style={style}
/>
);
}
Hello @robvan2 @awongCM @cipherwisdom,
Can you update the react-native-svg
?
I couldn't reproduce the issue.
Please share the example to reproduce the issue with us if you still have it.
Thank you.
Hello @robvan2 @awongCM @cipherwisdom, Can you update the
react-native-svg
? I couldn't reproduce the issue. Please share the example to reproduce the issue with us if you still have it. Thank you.
@bohdanprog I already mentioned the solution to this link page I posted earlier in this thread.
https://github.com/software-mansion/react-native-svg/issues/2235#issuecomment-2069532093
I had to uplift to the latest react-native-sg version and it works fine for me.
Hello @robvan2 @awongCM @cipherwisdom, Can you update the
react-native-svg
? I couldn't reproduce the issue. Please share the example to reproduce the issue with us if you still have it. Thank you.@bohdanprog I already mentioned the solution to this link page I posted earlier in this thread.
I had to uplift to the latest react-native-sg version and it works fine for me.
Thanks. Feel free to open a new issue if someone still has an issue connected with that.
"react-native": "0.74.5", "react-native-svg": "15.2.0"
isok
"react-native": "0.74.5", "react-native-svg": "15.2.0"
isok
You saved my day. I downgraded from 15.7.0 to 15.2.0 it works.