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

cant use this library in react@18.2.0 #340

Open
galmalka21 opened this issue May 11, 2023 · 12 comments
Open

cant use this library in react@18.2.0 #340

galmalka21 opened this issue May 11, 2023 · 12 comments

Comments

@galmalka21
Copy link

are you going to update the library soon to be able to run in react@18.2.0?

@Rehankhalil462
Copy link

@galmalka21 use --legacy-peer-deps flag while installing this package. It will work with react@18.2.0.

@dcastillogi
Copy link

For those who are attempting to deploy to Vercel, keep in mind the following steps: Go to Settings > General > Build & Development Settings. Then, override the Install Command by using either npm install --force or npm install --legacy-peer-deps.

@val-samonte
Copy link

Big issue tbh. If someone created a fork to fix this please drop it here. Thanks.

@vbsh123
Copy link

vbsh123 commented Jun 26, 2023

If this is still relevant, there's a similiar version that works (idk if its forked from this one though but it is based on this)
https://github.com/kybarg/react-qr-scanner

@vairaselvam
Copy link

Even I need a solution. I migrated ReactJs from 16 to 18. Now react-qr-reader is throwing error.

@kelvinCJJ
Copy link

Any solutions?

@hholmes6
Copy link

same

@phanthaiduong22
Copy link

I have same issue

@Jcoloma13
Copy link

"overrides": {
"react-qr-reader": {
"react": "$react",
"react-dom": "$react-dom"
}
}

You can try this.

@adlarionov
Copy link

Just run npm i --legacy-peer-deps react-qr-reader, then in your generated package-lock.json rewrite peerDependencies in node_mobules/react-qr-reader field. Lastly, run npm i. Everything should work.
image

@h0jeZvgoxFepBQ2C
Copy link

Just run npm i --legacy-peer-deps react-qr-reader, then in your generated package-lock.json rewrite peerDependencies in node_mobules/react-qr-reader field. Lastly, run npm i. Everything should work. image

I'm not sure if i'm totally right, but just ignoring dependency issues is not the best way forward. this issue should be fixed

@adlarionov
Copy link

Just run npm i --legacy-peer-deps react-qr-reader, then in your generated package-lock.json rewrite peerDependencies in node_mobules/react-qr-reader field. Lastly, run npm i. Everything should work. image

I'm not sure if i'm totally right, but just ignoring dependency issues is not the best way forward. this issue should be fixed

Yes, you are absolutly right. I just showed my solution to this problem. It is an issue that should be fixed for sure

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