react-native-qrcode-svg icon indicating copy to clipboard operation
react-native-qrcode-svg copied to clipboard

react-native-svg v13 support

Open GunnarAK opened this issue 2 years ago • 12 comments

v13 dropped a month ago

npm i react-native-qrcode-svg
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native-svg
npm ERR!   react-native-svg@"^13.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-svg@"^12.1.0" from [email protected]
npm ERR! node_modules/react-native-qrcode-svg
npm ERR!   react-native-qrcode-svg@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/gunnark/.npm/eresolve-report.txt for a full report.

GunnarAK avatar Sep 18 '22 15:09 GunnarAK

+1 for this issue

AndreiBelokopytov avatar Oct 24 '22 11:10 AndreiBelokopytov

Up

kaycklbr avatar Oct 24 '22 13:10 kaycklbr

+1 having the same error

romarpla avatar Nov 21 '22 20:11 romarpla

+1 having some issue

B0Y3R avatar Nov 21 '22 20:11 B0Y3R

@awesomejerry I wanted to have a look at upgrading this myself, but I got stuck with installing the example app locally. I'm using node 14 (via nvm). Installing root package.json first, then example package.json. Via npm install

The Metro packager is not able to locate the react-native-qrcode-svg package as it is a symbolic link in the app's node_modules. And as far as I'm aware after 5 years and counting Metro still does not support sym links https://github.com/facebook/metro/issues/1

So how do you go about this? There's no documentation inside the example project which would be of help here unfortunately.

Error example:

iOS Bundling failed 220ms
Unable to resolve module react-native-qrcode-svg from /Users/gunnark/Repositories/personal/react-native-qrcode-svg/example/App.js: react-native-qrcode-svg could not be found within the project or in these directories:
  node_modules
  ../node_modules

Also, why does the example app have both a yarn.lock & package-lock.json file?

GunnarAK avatar Nov 22 '22 11:11 GunnarAK

+1 also experiencing this issue

emmanuelmahove avatar Nov 24 '22 09:11 emmanuelmahove

+1 having same error

ansh-dagha avatar Nov 27 '22 12:11 ansh-dagha

+1 same here

brad-ps avatar Nov 30 '22 01:11 brad-ps

+1 same issue

onkr0d avatar Dec 07 '22 03:12 onkr0d

+1

1level1 avatar Dec 14 '22 19:12 1level1

Until #166 is merged, you can use the overrides field on your package.json if npm is >=8.3.0

{
  ...
  "dependencies": {
    ...
    "react-native-qrcode-svg": "^6.1.2",
    "react-native-svg": "^13.6.0",
    ...
  },
  "overrides": {
    "react-native-qrcode-svg": {
      "react-native-svg": "$react-native-svg"
    }
  },
  ...
}

ccoloma avatar Jan 10 '23 09:01 ccoloma

This should help you https://www.youtube.com/watch?v=SfWKPIVoS8w&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=4

BraveEvidence avatar Feb 25 '23 14:02 BraveEvidence