Closed Danscap closed 2 years ago
@Danscap Is your project open source? Can I have your repo for debugging?
I'm experiencing a similar issue, with a Node.js Express React/Redux app, this module was making the whole app crash with no messages 🤕
I'm going to do some investigating and get back to yall
@Donaldcwl Im getting the same thing using angular 10, did you manage to find a fix?
Ended up importing it in index.html
<!-- browser-image-compression -->
<script
src="https://cdn.jsdelivr.net/npm/browser-image-compression@1.0.12/dist/browser-image-compression.min.js"></script>
and then using it without type support in my component
// This is imported in the index.html
declare var imageCompression: any;
...
...
await imageCompression(file, options)
had the same issue imageCompression is not a function
Had the same issue with Angular 11: browser_image_compression__WEBPACK_IMPORTED_MODULE_5__ is not a function
Alguma novidade?
Installing the latest version of browser-image-compression and importing it in a react project leads to an error no matter what I do.
Note that it works in the example React app in this repo but I cannot use it in any projects. I have tried creating a module out of the component class and putting that in my project. I have also tried matching every dependency in the React app in mine to no avail.
The exact error is:
"Unhandled Rejection (TypeError): browser_image_compressionWEBPACK_IMPORTED_MODULE11default(...) is not a function"
and it occurs at the line where the imageCompression function is called.