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

Can this library runs on Node.js ? #89

Closed
GreenFlag31 opened this issue Aug 9, 2024 · 1 comment
Closed

Can this library runs on Node.js ? #89

GreenFlag31 opened this issue Aug 9, 2024 · 1 comment

Comments

@GreenFlag31
Copy link

GreenFlag31 commented Aug 9, 2024

Hi,

I have multiple times tried to make it work in a Node.js environnement but unsucessfully. There is a part in the readMe "Recommended Usage with Node + ESM", so is this possible?

If it's possible, can you provide a simple example?

Thanks in advance

@Sec-ant Sec-ant added question Further information is requested and removed question Further information is requested labels Aug 18, 2024
@Sec-ant
Copy link
Owner

Sec-ant commented Aug 20, 2024

Hi, apologize for the late response.

This lib is meant to be used as a polyfill of the Barcode Detection API, which is a Web API and requires other Web and DOM APIs like canvas, DOMRectReadOnly, etc. Unless they're also properly polyfilled (which may also introduce significant performance loss), this lib is not likely to be used in node.

There is a part in the readMe "Recommended Usage with Node + ESM", so is this possible?

This is for building not running.

If you want to run barcode detections in other JS runtimes, you can check out the lower-level zxing-wasm project this lib depends on, which also provides more control options.

@Sec-ant Sec-ant closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@Sec-ant Sec-ant pinned this issue Aug 20, 2024
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

2 participants