quaggaJS
quaggaJS copied to clipboard
../node_modules/quagga/lib/quagga.js' does not provide an export named 'default'
Hey, I am adding
import quagga from 'quagga';
and get the error in the title. I haven't added anything else. Testing it on Chrome
and if I try import * as Quagga from 'quagga';
I get typeError: Cannot read property 'get-pixels' of undefined at webpackUniversalModuleDefinition
Am I missing anything ? Thank you
that's an interesting result -- are you attempting to do this without using webpack or anything like that, just importing it via native javascript import? i have tried that exactly zero times on any code anywhere, so i'm not real sure how it works, if so. :-D
Hmm ... yes. So I need to use webpack? I'm trying to import it in a web component. Thanks for the comment.
That, I don't know. The app I'm building uses babel and webpack, as does pretty much every project i've ever seen that is using more advanced things like import.. so.. i don't really have any idea why that would fail.. :-S