zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
https://zxing-js.github.io/library/
Apache License 2.0
2.5k stars 547 forks source link

Demo page is hitting error: ZXing is not defined #447

Open JTensai opened 3 years ago

JTensai commented 3 years ago

When loading the demo pages I am hitting this error:

Uncaught ReferenceError: ZXing is not defined

This is the code its pointing to:

    window.addEventListener('load', function () {
      let selectedDeviceId;
      const codeReader = new ZXing.BrowserMultiFormatReader()
      console.log('ZXing code reader initialized')
      codeReader.listVideoInputDevices()
        .then((videoInputDevices) => {

Looking into using this library, but this is concerning.

rpungello commented 3 years ago

Looks like it's failing to load the zxing js from unpkg: GET https://unpkg.com/@zxing/library@0.18.6/umd/zxing-browser.min.js net::ERR_ABORTED 404

Trying to load that URL does indeed produce a 404 (at time of writing).

timgentry commented 3 years ago

If it helps, if I locally overwrite the src URL with https://unpkg.com/@zxing/library@latest/umd/index.min.js it works. Only index related files are now available, see https://unpkg.com/browse/@zxing/library@latest/umd/. This is basically a duplicate of #445

xg1990 commented 3 years ago
image

same problem here

Florian-Schoenherr commented 3 years ago

bump

github-actions[bot] commented 6 months ago

Stale issue message