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
Bug: zlib data error on Fedora Linux when running NodejsNpmBuilder:NpmPack #3965
Comments
Thanks for reporting the issue! I've looked at a few similar issues online, my recommendation would be to try upgrading zlib and node version, would that be feasible for you? Let me know if this helps! |
I found similar problems online before reporting and they generally had significantly older versions of node. The closest I've seen on stackoverflow is Sam build fails with: Build Failed Error: NodejsNpmBuilder:NpmPack - NPM Failed: npm ERR! code Z_DATA_ERROR. My system is as up to date as it can be using the standard Fedora repos and I tried multiple nodejs versions that are available in Fedora 36 (from official fedora repo). Fedora defaults to the LTS nodejs releases so I'd expect to be able to use sam cli with nodejs 16. Fedora currently has zlib 1.2.11 in the repository. Fedora has a bugzilla issue for updating to 1.2.12. I presume it's a similar situation for Arch. I suspect that the zlib update to 1.2.12 maybe what I need but this project should really work with the LTS nodejs releases and zlib versions that are currently distributed with mainstream Linux distributions. If sam cli is using a newer version than what's generally available to users of current Linux distributions such as Fedora and Arch then that in itself should be considered a problem. |
This error is coming from one of the steps in lambda builders, and in that step, we are running following
So if you try to run same Please let us know if you have further questions. |
Closing as there hasn't been more information provided. Please reopen if you have further questions. |
The error is not present when running
The zlib version is already updated in Fedora 37, zlib-1.2.12 Do you think there is another way to isolate the way
|
I had to change python version to 3.9 to be able to build aws-sam-cli from source, with
Something in the official release is affecting npm invocation. |
Seeing the same behavior. Commenting here as the issue tracker says to do that rather than open a new issue. I've been using This seems most relevant
Manually invoking the
Based on the error it seems like maybe the
|
This issue should be reopened. I get almost the same output as @williamhaley above (thank you for the detailed output which I could easily compare to mine). My system:
I also tried downgrading everything in various combinations but whit no success. I also cannot use a container with This the log of a run with log.txtA section view of the error:
|
Hi there, Re-opening this issue to continue the discussion. Thanks for providing detailed outputs here. But it seems like the error is generated from NPM. I did a quick google search and it might be that your system's zlib might not be compatible with NPM or NodeJS version
Can you try searching NodeJS or NPM changelog's with your OS and see if you need to update zlib there? Thanks! |
Closing issue due to inactivity. As I mentioned previously, it seems like the issue is coming from the operating system and not related to SAM CLI. |
|
Description:
When running
sam build --template-file template.yaml
in my project I get the following errorSteps to reproduce:
Install aws-sam-cli-linux on Fedora 36 (or Arch Linux) then try to use it
Observed result:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.52.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: