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
Error: Cannot find module 'stream' #704
Comments
i get same issue |
Same issue |
https://stackoverflow.com/a/55601717 [Error: Cannot find module 'stream' · Issue #704 · Stuk/jszip](Stuk/jszip#704)
https://stackoverflow.com/a/55601717 [Error: Cannot find module 'stream' · Issue #704 · Stuk/jszip](Stuk/jszip#704)
I'm also encountering this. It occurs when loading the script: <script src="https://cdn.jsdelivr.net/npm/jszip@3.7.1/dist/jszip.min.js"></script> Was using JSZip 3.5.0, now on 3.7.1 with no change. I'm on Safari 14.1.1 (15611.2.7.1.6) on macOS Catalina. Chrome works, but my tool is a browser-based tool for non-technical users so requiring Chrome isn't an option. I'm pretty sure this used to work in Safari on High Sierra, but I can't roll back to confirm. The call stack is:
|
It looks like the modules are all organized into an object mapping numbers to pairs of a function and an object defining module names as other numbers in the outer object. The one that requires Presumably there's some sort of fallback loading that's supposed to happen, particularly given that it works in Chrome, but that's beyond my understanding of this code. |
Also, comparing jszip.js to the contents of the repository, it seems like the module-loading machinery might be generated code. If so, this may be a toolchain (either usage or implementation) issue rather than a bug in jszip code. |
This seems to be the same as issue #736 which has a suggested solution in one of the comments. |
Hello,
Get the errror : "Cannot find module 'stream'" when including dist/jszip.min.js in my sourcecode as stated in the documentation :
"For a browser, there are two interesting files : dist/jszip.js and dist/jszip.min.js (include just one)."
Not using NodeJS nor npm/bower etc.
Platform is : Windows 10, Chrome Version 84.0.4147.89 same with Firefox 78.0.2 and Edge Version 84.0.522.44.
Has somebody experienced the same?
Am i doing something wrong?
Thanks you !
The text was updated successfully, but these errors were encountered: