Comments (5)
I've updated the package as of adf1a5b and v0.4.3 on NPM, try updating. I reread the stack trace in what you linked and it's actually a server-side issue, not client side.
from fflate.
Thanks for the quick turn-around here - I've asked the reporter to update. (I will also try and replicate the issue today, so will provide feedback either way, either from the reporter or myself)
from fflate.
I can’t reproduce with the fix in-place. Thank you very much.
from fflate.
Hey, thanks for the issue report! I'm still trying to figure out how to make an NPM package reliably support the browser without breaking Node.js. The main problem is exactly this: some environments can't reliably use the "browser"
field. I don't quite understand what's happening here, though; is a bundle generated for Node.js being served on the client?
In any case I'll just have to brute force resolve this issue by bundling both the browser and Node runtimes when the Node.js version is loaded, but only load the browser version in the browser. I guess bundle size isn't even an issue in Node, so it works fine.
from fflate.
On second thoughts, the reality is that tree shaking must be disabled for this to have happened (or the worker import would have been removed), so why not use the UMD build? That supports both Node.js and the browser from a single script.
EDIT: @jacogr please disregard absolutely everything I've said so far, I found the real issue and will resolve it now. Essentially, this package is Node 10+ with --experimental-worker
and Node 12+ natively. To make this work for older environments, I simply need to hoist the require call to the function itself so that it is lazy loaded (i.e. only attempted when the caller requests the async version). I'm going to update the package, which should resolve the issues if you update downstream.
from fflate.
Related Issues (20)
- Deflate/Inflate does not work with zlib/gzip c++ HOT 7
- Add Bzip2?
- Hangs on gunzipSync of compressed content with invalid dictionary HOT 3
- Option to shorten output as much as possible HOT 3
- Incorrect argument order in AsyncFlateStreamHandler HOT 5
- Truncated output of gunzip if SIZE footer is incorrect HOT 5
- return uncompressed size instead of resized output buffer HOT 4
- Improve zip documentation HOT 1
- The encoded data was not valid for encoding utf-8 HOT 1
- Streams onData do not work as expected anymore HOT 8
- CDN bundle for 0.8.1 is broken HOT 2
- Async unzip maxing out CPU and memory for some files HOT 3
- fflate.decompressSync is not a function when using `nifti-reader-js` (React) HOT 7
- Occasional CRC Errors When Streaming Data into Zip using AsyncZipDeflate HOT 7
- `zipSync` can get order of ZIP entries wrong, due to how objects work HOT 3
- delete the rust code
- The 2nd+ JPG images in a zip stream being created are corrupt for some reason? HOT 9
- `gunzipSync` failing (0 gzip length) on some npm package tarballs HOT 1
- Unexpected EOF when inflating ZIP HOT 3
- Unzip error thrown when big file as compression type 9 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fflate.