react-qr-reader icon indicating copy to clipboard operation
react-qr-reader copied to clipboard

Build error

Open natget21 opened this issue 5 years ago • 4 comments

there is an error when building the react project while using theis library

natget21 avatar Jun 10 '19 12:06 natget21

If your react version is 15, then try downgrading react-qr-reader to version 2.0 or 2.1

I got a "Syntax Error" in by bundle.js on version 2.2.1. While it seems to work on 2.1.0, there is dependency on react 16. Haven't got any errors so far in version 2.0, yet to test actual functionality.

If your issue is something else, please post the error you're getting and the steps to reproduce the same.

EMPAT94 avatar Jun 19 '19 08:06 EMPAT94

I'm using react version 16.8.6, the error remains and the fix works.

gomesgustavo avatar Jul 08 '19 13:07 gomesgustavo

The version that acctually works was 2.1.2. What versions we tried:

  • 2.2.1 dont minify, the error happens in the webrtc-adapter/src/js/utils.js. We tried to fix, but after fixing with different syntax the 6th error in different declaretions, we leave...
  • 2.2.0 has a depency error:

Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • 2.1.2 it works
  • 2.1.0 dont read the QRCode, onScan always gives a null data

gomesgustavo avatar Jul 08 '19 19:07 gomesgustavo

Thanks @gomesgustavo, you save my day.

toanbku avatar Aug 20 '20 08:08 toanbku