Skip to content
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

generateAsync not work and no error thrown on v3.10.0 and v3.10.1 #864

Open
void285 opened this issue Sep 24, 2022 · 6 comments
Open

generateAsync not work and no error thrown on v3.10.0 and v3.10.1 #864

void285 opened this issue Sep 24, 2022 · 6 comments

Comments

@void285
Copy link

void285 commented Sep 24, 2022

It works on v3.9.1 or v3.7.1, but v3.10.x not work. I didn't try more previous versions.

@leowang1028
Copy link

It works on v3.9.1 or v3.7.1, but v3.10.x not work. I didn't try more previous versions.

I am the same as you, and I try to reduce the version to the same effect. It only appears in the production environment. The development environment is running normally

@damnwenxi
Copy link

It works on v3.9.1 or v3.7.1, but v3.10.x not work. I didn't try more previous versions.

I am the same as you, and I try to reduce the version to the same effect. It only appears in the production environment. The development environment is running normally

I have the same prob, its work on dev but not prod, i guess the error caused by build.

@sudoryan
Copy link

I'm having the same issue on dev with NextJS. I get a zip but it's not at all compressed using

const zipBlob = await zip.generateAsync({
   compression: "DEFLATE",
    compressionOptions: {
        level: 9
    }
});

@owendswang
Copy link

The exact same issue. Used in Tampermonkey '@require'. Downgrade from 3.10.1 to 3.9.1 and it works fine.

@edyhchan
Copy link

If you're using JSZip in some kind of browser sandboxed environment such as a userscript engine (e.g. Tampermonkey) JSZip v3.10+ will break because the new dependency setimmediate breaks in that case. This is explained in Tampermonkey issue #1600 along with a workaround.
I'll post a new issue highlighting this.

@444171810
Copy link

Yes, it's because the setImmediate dependency, and as a solution, I used "transpileDependencies: [/[/\]node_modules/\?jszip(.*)/]", in the vue.config.js in my vue project, and it worked. If it's a react project or something, I believe you can
use similar way to transpile the JSZip dependency specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants