WASM-ImageMagick: Uncaught TypeError: Cannot read property 'getSync' of undefined
magickApi.js:78 Uncaught TypeError: Cannot read property 'getSync' of undefined
at Object../node_modules/wasm-imagemagick/dist/src/magickApi.js (magickApi.js:78)
success after removing .default on line 78
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 16 (5 by maintainers)
I have done something like this now and it works like a charm, a bit hacky though:
I’m importing this package into a react app, and encountering this problem. Deleting the
.defaultworks, but is there a workaround that doesn’t involve modifying the contents of my node_modules, as this will be undone when it is built by my CI pipeline?There are a few security alerts that are raised for this project by a github bot… I should start merging some of them in, however since I use this project on a completely static website I am not too concerned about users hacking themselves.
@wind4gis I originally wrote this code directly in es6. cancerberoSgx came along and added in type script, tests and npm support.
From what I understand es5 is not working for commonjs. @Axure wrote a PR to address this issue, however it breaks the tests. I reran the tests today to validate they are in fact still failing.
@wind4gis you are more then welcome to adopt @Axure’s PR and resubmit a forked version that doesn’t break the tests
I will assure you the library does work, it has been used to save over 2500 hours of artists’ time at https://knicknic.github.io/croppy
You can view the entirety of the source code for in that page (not minified) or at https://github.com/KnicKnic/croppy