-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Uploaded file must be a non-empty zip again with Node16 #11118
Comments
Same here, using Serverless 3.19 and Node 16.15.1 |
Same here:
|
facing same issue |
Hey @rohityadav225 - are you on the latest version of the Framework? What installation method do yo use? Which Node version are you using? |
Hi @pgrzesik Below are the details
|
Based on the output you're on a very old Framework version @rohityadav225 |
updating to latest framework version fixed the problem but i see the following warning(s)
|
I have the same issue when using serverless-webpack and the following
|
@tobilg seems like the authors of the code bases fixed something. I can confirm that this problem is solved forr me (macos) by using the latest version of serverless and latest lts of node. Try to use |
Just so this is in here for those having an issue still I wanted to share how I fixed the issue on my end. I had to switch back to an earlier version of NodeJS (v14 LTS). I highly recommend using NVM (Node Version Manager) so you can switch back to the newer version. I also used the latest version of Serverless (v3 at the time) since it claims to have backwards compatibility. That was it honestly. Not a full intuitive answer as to why, probably something deprecated I'd guess. |
This error is still occurring with the latest versions of Node & Serverless :(
|
@Bastczuak this still persists, even with the latest versions: $ sls -v && node -v
Framework Core: 3.21.0
Plugin: 6.2.2
SDK: 4.3.2
v16.16.0 Error: UPDATE_FAILED: ListLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: 035629c1-4218-4041-9c8b-a2cf3e511f99)" cc @mnapoli |
big oof. Im a 100% sure it worked before closing the ticket. Then I'll reopen it. |
@Bastczuak Something very weird happened on my side:
|
Hey everyone, I'm trying to reproduce it but can't (all works fine). Though I have Node 18.3.0, has anyone tried upgrading to a higher major Node version? Given the last comment, it seems it's not consistent with the Node version, so that might be something else. If you use any plugins please list them as well, that could help! |
@mnapoli I can reproduce this with node 16.15 - no plugins, last serverless version |
tl;dr: Upgrade Background
This is confirmed when unzipping:
@Bastczuak mentioned this may have something to do with node-archiver but says it was fixed for them in 3.21.0 (the same version I'm using): My Solution I think the new archiver includes a new version of |
Thanks for your solution @timtrinidad ! |
Ah. In that case, I would do a |
Thanks @timtrinidad
Now everything works. |
I also had the same issue, using Node 16.17.0, I know my framework version is old. Just upgrading this package did the job. This is my environment configuration. Your Environment Information --------------------------- |
I'm using serverless with next.js and named the sls project the same name as the directory:
|
my error was fixed when running and editing the package.json files
and
It now deploys without the error. |
Facing same issue with Node 18.13.0 and serverless 3.34.0. |
I used "npm update" to update all dependencies and it worked for me |
if you use serverless-webpack, It would be good to try updating to the latest version (5.13.0). several while in debugging, I found that the reason was that appending buffered data to the zip file was failure. There are a lot of updates on that part in the 5.13.0. Running "serverless" from node_modules |
Hi i'm having issue
|
Same issue here using node v 20 |
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest version?
Is there an existing issue for this?
Issue description
Hello,
seems like the problem
Uploaded file must be a non-empty zip
which was resolved in #8772 is now appearing again when using Node 16.15.1 (at point int time the latest lts version). Seems like the problem is again innode-archiver
/crc32-stream
. A workaround is available by using node <= 15.5.Service configuration (serverless.yml) content
N/A
Command name and used flags
N/A
Command output
Environment information
The text was updated successfully, but these errors were encountered: