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

Errors while building: zxing-js.umd #395

Open
flistonfr opened this issue Jan 20, 2022 · 5 comments
Open

Errors while building: zxing-js.umd #395

flistonfr opened this issue Jan 20, 2022 · 5 comments

Comments

@flistonfr
Copy link

Despite the fact that is working correctly, I get errors while building:

"export 'BarcodeFormat' (imported as 'ZXing') was not found in '../third_party/zxing-js.umd'

Full errors: https://pastebin.com/raw/QRTh97su

This errors makes that I can't upload code to production enviroment.

I'm using versions 2.1.6.

Someone came across this problem?

Thanks!

@raulra08
Copy link

raulra08 commented Jan 21, 2022

Hi @flistonfr
I am wondering if you also got errors such as the ones described in this other issue

@flistonfr
Copy link
Author

@raulra08 I don't believe is the same.
Yours can't find the file. Mine is an import issue.

In my case, if a change in file '/node_modules/html5-qrcode/esm/zxing-html5-qrcode-decoder.js':
import * as ZXing from "../third_party/zxing-js.umd";
to
import * from "../third_party/zxing-js.umd";

Error is gone and build ok.

But, the error still occurs during install because I have to change build files.
Anyone knows a workaround?

Thanks!

@raulra08
Copy link

I wonder if it could be an issue with transitive dependencies and the versions you are using.

Anyways, for other who might know more/better I think another thing you could try to do is to maybe publish a public version of the code involved in this issue showing up.
So, maybe your @ ./app/javascript/controllers/picking_controller.js?
And config files like webpack, package.json etc

@flistonfr

@fydelio
Copy link

fydelio commented Feb 13, 2022

Exact same issue here, @flistonfr. I'm using Ruby on Rails with Stimulus.js as a front-end framework, and webpack to build the Javascript. What's you'r setup. Interestingly the fix you describe with zxing-html5-qrcode-decoder.js didn't work for me.

@xanxus135
Copy link

@fydelio @raulra08 @flistonfr
I actually figured out how to fix that question. but seem stupid way.
I just merge the zxing-js.umd content prepends in zxing-html5-qrcode-decoder.js and changes related variables.

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

4 participants