'requireNativeComponent: 'RNSVGLinearGradient' was not found in the UIManager

I installed react-native-chart-kit with the svg also and I got an error when I run the app. I have the basic code from the library site

enter image description here

<PieChart
data={data}
width={150}
height={220}
chartConfig={chartConfig}
accessor="population"
backgroundColor="transparent"
paddingLeft="15"
absolute
/>


Solution 1:[1]

This worked for me:

yarn add react-native-svg

Solution 2:[2]

I had the exact same problem with react-native-chart-kit's PieChart on ios. I solved it by doing 'pod install' in the ios directory, which installed RNSVG (12.3.0). It all worked fine after that, once I'd recompiled everything via Xcode.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Garfield Heron
Solution 2 Andy Duncan