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

Support lost in React 17? #24

Open
LGmatrix13 opened this issue Dec 22, 2021 · 8 comments
Open

Support lost in React 17? #24

LGmatrix13 opened this issue Dec 22, 2021 · 8 comments

Comments

@LGmatrix13
Copy link

I get the following error when installing it on React 17 with Nextjs:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-app@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project     
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from [email protected]
npm ERR! node_modules/react-qr-barcode-scanner      
npm ERR!   react-qr-barcode-scanner@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peerken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\LG\AppData\Local\npm-cache\eresolve-report.txt for a full report.       

npm ERR! A complete log of this run can be found in:npm ERR!     C:\Users\LG\AppData\Local\npm-cache\_logs\2021-12-22T13_51_30_740Z-debug.log     
█ 12/22 08:51 C:\...\my-app ► npm i react-qr-barcode-scanner
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree 
npm ERR!
npm ERR! While resolving: my-app@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project     
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from [email protected]
npm ERR! node_modules/react-qr-barcode-scanner      
npm ERR!   react-qr-barcode-scanner@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peernpm ERR!
npm ERR! See C:\Users\LG\Appotentially bropData\Local\npm-cache\eresolve-report.txt for a full report.
                                     pData\Local\npm
npm ERR! A complete log of this run c report.       an be found in:npm ERR! 

Is support lost with React 17?

@vndevil
Copy link

vndevil commented Jan 12, 2022

I have same error with react 17

@baimMN
Copy link

baimMN commented Feb 9, 2022

same here

@casaumayman
Copy link

Same here, is there any workaround?

@baimMN
Copy link

baimMN commented Mar 21, 2022

I use quagga.js for the alternative library

@SofianeBenkara
Copy link

SofianeBenkara commented May 5, 2022

If you have a dependency conflict, "npm install --legacy-peer-deps" should work for you otherwise a temporary solution is using older versions of the "react": "^16.9.0", which worked for me.

@steima
Copy link

steima commented Aug 31, 2022

None of the above mentioned ideas worked for me, so I forked this project and patched for React 17.

https://www.npmjs.com/package/@steima/react-qr-barcode-scanner

@lucaswong-commerceasia
Copy link

None of the above mentioned ideas worked for me, so I forked this project and patched for React 17.

https://www.npmjs.com/package/@steima/react-qr-barcode-scanner

Hi I'm using react 18, can you guide me how to fork the project?

@lakshmigandh
Copy link

If you have a dependency conflict, "npm install --legacy-peer-deps" should work for you otherwise a temporary solution is using older versions of the "react": "^16.9.0", which worked for me.

Can I use this library with react 16.8.0 ?

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

8 participants