react-qr-barcode-scanner icon indicating copy to clipboard operation
react-qr-barcode-scanner copied to clipboard

Support lost in React 17?

Open LGmatrix13 opened this issue 3 years ago • 8 comments

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?

LGmatrix13 avatar Dec 22 '21 13:12 LGmatrix13

I have same error with react 17

vndevil avatar Jan 12 '22 04:01 vndevil

same here

baimMN avatar Feb 09 '22 10:02 baimMN

Same here, is there any workaround?

casaumayman avatar Mar 21 '22 09:03 casaumayman

I use quagga.js for the alternative library

baimMN avatar Mar 21 '22 16:03 baimMN

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.

SofianeBenkara avatar May 05 '22 17:05 SofianeBenkara

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

steima avatar Aug 31 '22 21:08 steima

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?

lucaswong-commerceasia avatar Sep 14 '22 10:09 lucaswong-commerceasia

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 ?

lakshmigandh avatar May 22 '24 12:05 lakshmigandh