Shopify/polaris-viz

Expo React Native SVG Error

Opened this issue · 4 comments

Bug summary

When installing SHOPIFY Polaris viz native in a expo project, the React Native SVG included in the node modules of Polaris-viz-native clashes with the package included by default with expo.

Expected behavior

No clashes

Actual behavior

App fails on build time quoting a RNSVG error, short term solution is to add react native svg to resolutions in package.json.

Steps to reproduce the problem

  1. Install shopify polaris viz native in a fresh expo project, add a chart and run build.

Hey @bendrobinson1998 , were you able to fix your issue?

Hey @bendrobinson1998 , were you able to fix your issue?

Hi, I am still deleting the react-native-svg folder from the node_modules of the @shopify/polaris-viz-native directory before building, this works.

Well I'll be damned, it worked! I guess that dependency should be added as a peer dependency instead, thanks so much @bendrobinson1998 🚀

Btw, to avoid having to delete react-native-svg from node_modules manually, you can put this in your package.json file instead

  "resolutions": {
    "@shopify/polaris-viz-native/react-native-svg": "15.1.0"
  }