Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo React Native SVG Error #1613

Open
bendrobinson1998 opened this issue Dec 16, 2023 · 4 comments
Open

Expo React Native SVG Error #1613

bendrobinson1998 opened this issue Dec 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@bendrobinson1998
Copy link

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.
@bendrobinson1998 bendrobinson1998 added the bug Something isn't working label Dec 16, 2023
@markmssd
Copy link

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

@bendrobinson1998
Copy link
Author

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.

@markmssd
Copy link

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

@markmssd
Copy link

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"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants