react-native-svg-transformer icon indicating copy to clipboard operation
react-native-svg-transformer copied to clipboard

Solution to TypeError: Cannot read properties of undefined (reading '0')

Open psyrenpark opened this issue 4 months ago • 1 comments

Issue Description: Encountered an error: TypeError: Cannot read properties of undefined (reading '0')

Solution:

// Install the necessary plugins via yarn:
yarn add -D @svgr/plugin-svgo
yarn add -D @svgr/plugin-jsx

My Environment:

  • Upgraded to Expo 50 along with other libraries
  • Shifted to a monorepo environment
  • Upon inspection, identified the issue within defaultSVGRConfig's plugins

I hope this solution helps others facing the same issue.

psyrenpark avatar Apr 16 '24 09:04 psyrenpark

Thanks! Hopefully this helps people with that are seeing the same error 👍

kristerkari avatar Apr 18 '24 18:04 kristerkari