Uncaught ReferenceError: BwipJs is not defined - Runtime error
kjell-van-straaten opened this issue · comments
Kjell van Straaten commented
hi, I am trying to use your package to render a data matrix svg. Looks pretty useful, but unfortunately I am getting a runtime error in my console, which my editor doesn't flag.
Code:
import bwipjs from 'bwip-js';
Browser Console:
Uncaught ReferenceError: BwipJs is not defined.
Terminal:
no issues found
Using:
React 18.2 (typescript, vite)
bwip-js: 4.2.0
Any clue how to proceed? I haven't managed to solve this with the help of the web unfortunately.
metafloor commented
Without seeing the code, I would suspect you have a typo on BwipJs
. Your import name is bwipjs
.
Kjell van Straaten commented
i deleted my .vite/dep folder and now it works. Somehow the dependency broke