React Native Charts Kit not working

Hi everyone,

I’m testing react-native-chart-kit, when I test it in a simple snack I do not have any problem, however when I try to do it in Visual Studio Code using the metro bundler, I have the following errors:

Unable to resolve “react-native-svg” from “node_modules\react-native-chart-kit\src\pie-chart.js”
Failed building JavaScript bundle.
Unable to resolve “react-native-svg” from “node_modules\react-native-chart-kit\src\pie-chart.js”
Unable to resolve “react-native-svg” from “node_modules\react-native-chart-kit\src\pie-chart.js”
Unable to resolve “react-native-svg” from “node_modules\react-native-chart-kit\src\pie-chart.js”
Unable to resolve “react-native-svg” from “node_modules\react-native-chart-kit\src\abstract-chart.js”
Failed building JavaScript bundle.

Do you know if I am doing something wrong? Below the link of the snack:

The problem was, that I needed to install react-native-svg, you can do that by expo install react-native-svg

1 Like

Glad you got to the bottom of things!

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