-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Tried to register two views with the same name RNSVGPath #591
Comments
I'm back on 5.5.1 on my project but wanted to try 6.x to see if it would fix some other issues I was having. Rolling up caused this same conflict at first, because I seemingly had another library requiring the old version ( |
this happens when another lib has this package as a dependency, we can close this |
Alright, I'll go ahead and close this. |
Hi there, I get this error but i only have react-native-svg included once. |
+1 |
Expo also has the react-native-svg, so I remove the react-native-svg when using Expo, the error is gone |
Removing react-native-svg is just a workaround. |
Getting this issue. Is there a working solution? |
+1 |
If you're using yarn, then you can use resolutions: https://yarnpkg.com/en/docs/package-json#toc-resolutions "resolutions": {
"react-native-svg": "8.0.8"
} Or, if you're using npm, then you can run: https://www.npmjs.com/package/npm-force-resolutions#how-to-use rm -r node_modules
npx npm-force-resolutions
npm install |
This seems to be a new issue in Expo 31? None of the fixes in this thread worked for me |
@vjsingh Expo already includes react-native-svg, you shouldn't add it as a dependency. |
@msand Thanks for the advice. I'm not sure what it was since I removed my dependency on react-native-svg. It may be related to https://github.com/JesperLekland/react-native-svg-charts which I used, but that library appears to load react-native-svg as a peer dependency which looks to be the right way to do it? Anyway, for now I am just going to stick with Expo 30 until I have some more time. Thank you again for the help. |
I have a similar issue here. Expo 32, as soon as it renders the component, expo crashes. |
@abduraufsherkulov if you use expo, then this library comes built in and you shouldn't add it as a dependency, also make sure none of your other dependencies depend on it. Or, eject the project. |
I'm not sure if I set my package.json wrong somehow, but after upgrading to Expo 31 I had to change all imports of react-native-svg in a package I depend on to import from Expo instead. |
That sounds correct, Expo should probably change their setup, such that they also expose the react-native-svg module. |
You can find examples of ejecting from expo: https://github.com/msand/InfiniDrawExpo |
I've tried removing the react-native-svg dependency and updated my imports to use expo instead but when I run my app I get a: "React.isMemo is not a function. (In 'React.isMemo(component)', 'React.isMemo' is undefined)" Has anyone else experienced this or know what is wrong? |
Are you using react-redux or react-is? Perhaps this thread can help you: vercel/next.js#6117 |
Using react-redux. Tried the approach of pinning my version to 4.4.9 from 5.1.0 which it was initially. However, I'm met with other issues so don't really think that would be a feasible approach for me.. EDIT making the changes to use expo's svg, clearing node_modules, removing package-lock.json, running npm install and running expo start -c (with the clear cache flag) worked for me. |
i am still facing the same issue |
My case, |
I'm facing this issue as well I'm using I'm not using Expo, and the @msand solution doesn't work for me. Please reopen this issue |
Can you make a minimal reproduction first? |
@astw I am facing the same issue. Have you figured it out yet? |
@Jimexa I went through every file in react-native-svg-charts and changed import Svg {Line, etc,etc} from 'react-native-svg' to import Svg {Line, etc, etc} from 'expo' and that works for now. |
@dragslag You may want to look into Victory charts. I used react-native-svg-charts for a while, and it's a great library but not actively maintained anymore. The switch didn't take too long |
Thanks @vjsingh I'll check it out |
What should you do if you want to use react-native-qrcode-svg in Expo? |
How I fixed this:
|
Answer from StackOverflow |
I was able to solve this issue by installing the appropriate version using:
|
I have exactly the same situation. Did you manage to solve it? |
@Egizas, try installing using |
This issue is back in
|
I have a similar issue. if i remove it from
so there are two versions, the peer dep of another package is using an older version.
✅ ok from then |
moving react-native-svg towards the peerDependencies solved this problem for me. "peerDependencies": { |
this issue is basically due to the different react-native-svg dependencies. for example I was using a package react-native-cool-speedometer it was using a different version 12.x.x and I was using 13.5.0 after upgrading the react-native-coolspeedometer it was going |
I had the same issue. |
Make sure you set the width and height for the svg icon I had the same issue and it helps me :) |
As you can see in the screenshot, I get the issue when I tried use 2 libraries that use react-native-svg as dependency. I'm using RN 0.52 and RN-svg 6.0.1-rc.2
The text was updated successfully, but these errors were encountered: