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

TypeError: "size" argument must be a number #233

Open
Yirou opened this issue May 28, 2018 · 5 comments
Open

TypeError: "size" argument must be a number #233

Yirou opened this issue May 28, 2018 · 5 comments

Comments

@Yirou
Copy link

Yirou commented May 28, 2018

I have this error on generate zip.
After some researches, i found that it's compress function.
So, in zipFile line 270,
I replaced var postHeader = Buffer.alloc(name); by var postHeader = Buffer.alloc(name.length,name) to fix this error;

I don't know if it's my node version or not. I use node 8.11.2

@ivome
Copy link

ivome commented Jun 5, 2018

I have the same issue on node v9.8.0. That change also seems to fix the issue there.

@mmihic96
Copy link

I have the same issue on node v8.11.3. That change fixed issue.

@bolinfest
Copy link

Note that Buffer.from(name) also seems like it should fix the issue.

@bolinfest
Copy link

It looks like PRs to fix the issue have already been filed:

#234
#239

@bolinfest
Copy link

@cthackers It appears that the adm-zip<0.4.11 has a "high severity" vulnerability: https://snyk.io/vuln/npm:adm-zip:20180415; however, switching to 0.4.11 (we updated from 0.4.7: facebookarchive/nuclide@276f47a) introduces this bug, so could we please get a new release with this bug fixed so we can upgrade to a secure version?

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

4 participants