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

Error: Tried to register two views with the same name RNSVGSvgView #18

Open
kirill-dev-pro opened this issue May 6, 2022 · 5 comments

Comments

@kirill-dev-pro
Copy link

Got error from running an example from readme

Error: Requiring module "node_modules/react-native-animated-pagination-dots/src/index.tsx", which threw an exception: Invariant Violation: Tried to register two views with the same name RNSVGSvgView

react-native 0.64.3

@MykhailoTurok
Copy link

I have the same issue

@kriss-u
Copy link
Contributor

kriss-u commented Aug 4, 2022

This is because you are using a different version of react-native-svg on your project dependency. But, this package uses version ^12.1.0. This is very frustrating though. You have to revert back to the same version.

@weahforsage Can you please fix these dependencies issues? Maybe put it into peer dependencies. I don't know about creating modules. Otherwise, I would've sent a PR.

@kriss-u
Copy link
Contributor

kriss-u commented Aug 16, 2022

@weahforsage Can you please look into this sooner? This is causing some trouble at my end as well.

@ChrisMuga
Copy link

Have you tried wrapping your components in a <SafeAreaView/> instead of <View/>?

@kashaudhan
Copy link

kashaudhan commented Sep 25, 2022

To fix the issue I tried two workaround:

  1. Remove the node_module folder & run npm dedupe to fix package duplication (note: might not work in some cases)
    or
  2. comment Line number 5 where LiquidLike is being imported & remove LiquidLike when exported from package's index file, only if you are not using LiquidLike component (note: you'll have to do this every time when you add or remove any package)

These two things worked for me.
Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants