-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
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
StenciljsError: ReferenceError: File is not defined #92
Comments
@Scan0815 Do your test environment has the |
@Donaldcwl hi, thanks for answer. I think React prerender, use also a internal window object, hydrating components is not possible without. Maybe you can check if File exists in window. |
@Scan0815 Thanks for your suggestion, extra checking on whether File and FileReader exist in the Window object will be added in the next release. |
@Donaldcwl i have debug a little deeper. I found that not the isBrowser check is the problem. i hope this help. |
fixed in v1.0.15 |
hi, i have a problem with my test suite and the browser-image-compression lib.
ReferenceError: File is not defined,
also not working in ssr, get the same error.
i read that you will fix it in 1.0.8, but now i on 1.0.14 and is not working.
You write from a trycatch workaound, but the error will get direct on import call.
import imageCompression from 'browser-image-compression';
The text was updated successfully, but these errors were encountered: