-
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
Unable to deploy to Serverless due to 'empty zip' #8794
Comments
Update: I received another message from the support telling me to create this issue cause it looks like to be a bug in Serverless, I made one yesterday in Apollo Lambda repo apollographql/apollo-server#4856 |
I can confirm this from a project without usages of Apollo:
This happens regardless of the version of |
Yeah. I'm using Cloudformation, S3, and Lambda along with Serverless |
I successfully deployed the aws-python3 template using node image (14.15.4-buster). With the image 15.6.0-buster I have the same problem. |
Yeah, Node version was the problem. Here's a quick script that I made if anyone needs it: sudo npm install -g n # Install N
sudo n 14.15.4 # Install a specific version of Node
# n run 14.15.4 index.js # Run a script without change the global path
# n which 14.15.4 # Search the path of the installed Node
n 14.15.4 # Set the installed Node as global, requires the terminal to be restarted
serverless deploy |
Hello ( : and thanks @pgrzesik and @Bumbleblo |
I hope that it supports Node 15 as soon as possible, once security failures were found in previous versions... |
Downgrading the to node version |
Thanks for confirming that 🙇 Would you be okay with closing this issue and tracking everything via the one I linked? |
Confirmed solution by @sphinxs . |
Hello & Thanks.., Downgrading the node version to 14.15.4 worked for me too. |
I got the same issue yesterday. Thanks and confirmed with the downgrade to 14.15.4 works fine. |
Closed |
Got the same issue and downgrading to 14.15.4 worked for me as well |
Same error on Ubuntu 20.04 using 16.2.0 node version. Downgrade to 15.3.0 and now everything is working. |
^^ the above worked for me as well |
excellent! this worked man! |
As of October 2021, the above solution is still valid. |
NODE 16.09.1 have same problem |
@KalanaPerera What version of the Framework are you using? Please reinstall the Framework to ensure all dependencies are also upgraded |
Used version: 2.16.1 After downgrading NODE to 15.5.1 worked fine. Thank you for quick reply. |
@KalanaPerera You're using a bit outdated version of the Framework - upgrade to the newest version should help as well |
I have also experienced this issue with node v16.15.0, downgrading to v14.15.4 resolved it. |
@camranhansen What version of Framework were you using? All new version of the Framework should not run into this bug, doesn't matter what Node version they're using |
@pgrzesik Yeah, I think that my Serverless version was the real issue here. Upgraded to 3.17 and a few issues have actually been fixed, including something with graphQL schema validation. Thank you for the suggestion. |
Great to hear you've been able to resolve this issue 🎉 |
I have a GraphQL API that has two indexes, one runs Express (index.js) and the other runs Serverless (indexServerless.js). For the Serverless I use
serverless-offline
to test the API out of Serverless. I tested both Express and Serverless locally and both of them are working. If I try to deploy to Serverless throughserverless login
andserverless deploy
I receive the following message from Serverless CLI:And this one from Cloudformation:
Which is strange cause I have not changed the API since the last deploy so I contacted Serverless support but they throw GraphQL into the conversation and told me that they could not help me, any idea on how to fix it?
Here's the serverless.yml:
The indexServerless.js:
And the graphql.js, which export both configurations, i.e Express and Serverless:
I tried to exclude node_modules by setting exclude on serverless.yml and update the Node version, but no changes.
Here's the Serverless CLI version:
And the Node dependencies:
The text was updated successfully, but these errors were encountered: