soldair / node-qrcode

qr code generator
MIT License
7.48k stars 624 forks source link

Uncaught ReferenceError: ReedSolomonEncoder is not defined #292

Open sese53 opened 2 years ago

sese53 commented 2 years ago

when use node-qrcode, there's a error. "Uncaught ReferenceError: ReedSolomonEncoder is not defined"

`import QRCode from 'qrcode'; const useQrCode = () => { const canvas = document.querySelector('#canvas'); QRCode.toCanvas(canvas, props.orderInfo.qr_code, (err: any) => { if (err) { console.log('err------', err); }

soldair commented 2 years ago

Pretty unexpected. Your usage is rather typical so not sure why. Could it be how you're bundling?