We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using it like this:
import { createCanvas, loadImage } from 'canvas'; import { scanImageData } from '@undecaf/zbar-wasm'; const getImageData = async (src) => { const img = await loadImage(src); const canvas = createCanvas(img.width, img.height); const ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); return ctx.getImageData(0, 0, img.width, img.height); }; const url = 'src/IMG_3361.jpg'; const main = async () => { const img = await getImageData(url); const res = await scanImageData(img); console.log(res[0]?.typeName); console.log(res[0]); console.log(res[0]?.decode()); }; main();
and getting
TypeError: t is not a function at n (file:///Users/Projects/scna/node_modules/@undecaf/zbar-wasm/dist/main.js:15:706)
The text was updated successfully, but these errors were encountered:
While I am looking into this, you could try to replace
import { scanImageData } from '@undecaf/zbar-wasm';
with
import { createRequire } from 'module'; const require = createRequire(import.meta.url); const { scanImageData } = require('@undecaf/zbar-wasm');
as a workaround. This is equivalent to what the missing function t should do.
t
Sorry, something went wrong.
bbddd7b
@da1z : Should be fixed in version 0.9.16, please feel free to re-open.
No branches or pull requests
I am using it like this:
and getting
TypeError: t is not a function at n (file:///Users/Projects/scna/node_modules/@undecaf/zbar-wasm/dist/main.js:15:706)
The text was updated successfully, but these errors were encountered: