Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get error when trying a minimal test using CRA #3

Closed
asharafshahi opened this issue Apr 15, 2019 · 5 comments
Closed

get error when trying a minimal test using CRA #3

asharafshahi opened this issue Apr 15, 2019 · 5 comments

Comments

@asharafshahi
Copy link

Failed to compile.

./node_modules/reactive-qr/dist/index.js
Attempted import error: './qr_decode.worker' does not contain a default export (imported as 'QRWorker').

@F1r3Hydr4nt
Copy link

Also getting this :~/

@NSNJRGL
Copy link

NSNJRGL commented Jun 30, 2019

@tigranbs any answer?

@tigranbs
Copy link
Owner

@Nasaakaa thanks for pushing on this, have tried today on my other environments, I've been able to get it working without issues, however, added console logs on main onInit and onCode events for a demo, just to see if your browser handles WEBRTC or not.

Also for qr_decode.worker @asharafshahi it shouldn't contain any exports, because the final built file is just a Service Worker which loads up within browser, you just need to import it would assigning to a variable (it is already done inside).

Please try also running HTTPS=true npm start to make sure you have present HTTPS, because for browser it is important to be under localhost or with https in order to access WebRTC features.

@NSNJRGL
Copy link

NSNJRGL commented Jul 1, 2019

Thank you for your reply.

Yeah, I see. It's successfully working. I am very appreciated @tigranbs.

@hasanzia1993
Copy link

using with/without HTTPS=true npm start, tried on localhost
but still getting same error 64:27-35 "export 'default' (imported as 'QRWorker') was not found in './qr_decode.worker'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants