Next js 14 Depedency zbar.wasm got error Module not found
Closed this issue ยท 4 comments
ary21 commented
Hi there, hopefully can help on this, thanks a lot for ur time
version :
"next": "^14.1.1",
"react": "^18",
"react-barcode-scanner": "^1.0.3",
when next build got error :
./node_modules/@undecaf/zbar-wasm/dist/main.js
Module not found: Can't resolve 'module'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@preflower/barcode-detector-polyfill/dist/main.js
./node_modules/react-barcode-scanner/esm/index.js
preflower commented
I'll create minimal examples to reproduce this scenario
preflower commented
I'll create minimal examples to reproduce this scenario
I guess it's caused by SSR, i will consider add SSR support for this library
preflower commented
Fixed in v2.0.0
preflower commented
And library have a breaking change, please read doc: https://preflower.github.io/react-barcode-scanner/guide#nextjs