-
Notifications
You must be signed in to change notification settings - Fork 221
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
Unable to resolve "react-native-svg/css" Unable to resolve "react-native-svg/css" from "node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js" #225
Comments
@kkpo4553 How do i update this in the package itself though ? Why is this fix not a part of the package ? |
hello @cay-cospete we would need to get more info about your setup to help you. What version of |
@cay-cospete have you resolve it? |
hey @alexsvt2 although it is definitely similar, it is not the same as yours which looks as if in your project the library is not installed. I can take a look if you answer my questions in this post: #225 (comment) |
Yeah my mistake, I used npm i -S and worked, thank you |
I am facing the same issue although I already ran with npm i -S The version the tool installed: This is the version of react-native I am using: error: Error: Unable to resolve module react-native-svg/css from C:\Users\eliza\StudioProjects\Torus\node_modules\react-native-qrcode-svg\src\LogoSVG\index.native.js: react-native-svg/css could not be found within the project or in these directories:
|
hey man I submitted a patch fix, but if you find node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js and change line 2 from worked for me hope helps |
But that means I need to manually hack node_modules file every single time developers rebuild since we are all actively making changes to the code and will need to run 'npm install'. Can you share which new version will contain this fix and ETA? |
@shengl711 you can change line 2 from import { LocalSvg } from 'react-native-svg/css'; to import { LocalSvg } from 'react-native-svg'; |
I am getting this error on both version of react-native-qrcode-svg "react-native-qrcode-svg": "^6.3.12", "react-native-qrcode-svg": "^6.2.0", my react-native version is: "0.68" I have try all the above fixes but not worked, Unable to resolve "react-native-svg/css" from "node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js" Appreciate the help. Also i have try the npm i -S but not worked. |
@StepToTop - let me try that and get back to you. @AleeFarook - what I tried originally before the feedback I received in this forum is to comment out line 2 that's causing the issue directly in node_modules file and build was able to run successfully. I will try out what StepToTop recommended before npm -i to see if that works. |
Hey this solved ? |
No, the issue isn't resolved. When we need to patch or hack node_modules files, the issue is still there. @StepToTop - thank you for the feedback. I didn't realize I need to install patch-package in order for this to work and unfortunately I am unable to install this package because the code I work on is co-developed with others. So I need to get their approval before adding this. Do you know which version could have the actual fix so we don't need to patch or do any hack in node_modules file? |
@shengl711 Oh you remind me of what I did before... I used |
@StepToTop - Thanks a lot! I think it works as I ran npm uninstall and npm install [email protected] and re-build the app, and I don't even see src/logoSVG folder in node_modules\react-native-qrcode-svg Btw, are you by any chance also using react-native-vision-camera to scan qrcode in your project? I am facing even more dire errors similar to below reported issue where the latest version is no longer compatible with SDK 33 which is what I have right now. I am trying to find an older version that is compatible but the documentation is so limited. I wish they have better documentation on which specific version is compatible with which SDK/Gradle. |
@shengl711 how about trying to use version |
Few points from me: There is an I'm not getting the error about importing, and I don't think the import problem is a bug in @DyerMaker42 so if anyone is getting Otherwise please reproduce this inside an Example App and then if I see the actual error I can try to help some more. |
@StepToTop - thank you for sharing version 2.15.6 of react-native-vision-camera being compatible with SDK33. I tried it and am now facing this issue reported in 'kotlin-android-extensions' Gradle plugin is deprecated #504 and trying to find ways to disable the extension in react-native-vision-camera since this isn't used anywhere else in the project. I am trying to work through that and in parallel I did try to upgrade to SDK35 but then I was facing other build issues. @DyerMaker42 - thank you for the info. That helps. I am not quite ready to use the latest version of react-native-svg since it's used in other parts of the project that I am not familiar with. I will keep that in mind and try that locally when the qr code feature I am building is making progress. |
I have faced this issue with the following packages I have solved this by editing the following package to the react-native-svg: "^14.0.0" |
I am getting this error on
"react-native-qrcode-svg": "^6.3.12",
Unable to resolve "react-native-svg/css" from "node_modules/react-native-qrcode-svg/src/LogoSVG/index.native.js"
What is the issue here ?
The text was updated successfully, but these errors were encountered: