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

QrScanner scanImage is not a function

Open karmac2015 opened this issue 1 year ago • 1 comments

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

karmac2015 avatar Jan 18 '23 07:01 karmac2015

You might need to require the default export:

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

sisou avatar Jan 18 '23 11:01 sisou