nimiq / qr-scanner

Lightweight Javascript QR Code Scanner
https://nimiq.github.io/qr-scanner/demo
MIT License
2.44k stars 529 forks source link

QrScanner scanImage is not a function #220

Open karmac2015 opened 1 year ago

karmac2015 commented 1 year ago

I am trying to use QrScanner in my electron app like the following:

const QrScanner = require('qr-scanner');
QrScanner.scanImage(image)......

But I have always the followitng error: QrScanner.scanImage is not a function

sisou commented 1 year ago

You might need to require the default export:

const QrScanner = require('qr-scanner').default;