-
Notifications
You must be signed in to change notification settings - Fork 3.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
[lambda-nodejs] Bundling a lambda_nodejs.NodejsFunction fails after upgrading to 1.58.0 #9673
Comments
@jogold well, I got the same result after doing a fresh clone and running the commands. However, you can see the issue in Github workflows https://github.com/markusl/cdk-ecr-image-scan-handler/runs/984246568 |
Is Docker available in your Github Action? If not, "local bundling" is coming #9632 soon... |
@jogold I'm not sure what do you mean? The Github workflow is generated by the 'projen' tool and should likely include what's needed. Something has changed between 1.57.0 and 1.58.0 since I'm also getting the same error now locally after running:
|
OK, Can you try (cc @eladb) |
@jogold right, that seems to solve the local build for that configuration. However, I'm trying to figure out how the project configuration should be done to avoid this: https://github.com/markusl/cdk-ecr-image-scan-handler/runs/984349252
Do you have a reference setup for how to provide directory layout, |
Cut a similar issue (#9709). I think your issue can be solved, or at least changed to a new error, by clearing the output cache. Not sure which one, so all to be safe: |
Also by |
@markusl is this still an issue? were you able to build? does it only fail in your GitHub Action? |
@jogold Yes, there are still several issues related to publishing a JSII construct that includes a
Please let me know if I'm trying to do something that the construct is not designed to do. It might just be easier if you provided a reference implementation that users could fork to start working on their custom constructs. |
Hit the same issue when starting a fresh new project to demonstrate this bug https://github.com/aws/aws-cdk/issues/9812. The project is here: As you can see is very simple, but when running
It produces this output:
With no further information. |
I can confirm that with CDK v. 1.57.0 it works like a charm |
Resolved here: #9709. In 58->59 entry: |
The problem happened yesterday, after upgrading from 1.57.0 to 1.59.0. |
The fix for |
Closing for now. Reopen if 1.60.0 does not solve this |
Please, re-open as this error still exists with CDK v1.61.1. It works locally, but not in GitHub Actions (see https://github.com/pgarbe/cdk-ecr-sync/runs/1048483828?check_suite_focus=true#step:9:10) |
@pgarbe in a GitHub Action you should try with Local bundling. |
That worked. Thanks @jogold |
It seems that there might be something wrong with generating 'asset-output/index.js'.
This is the log I get from 'yarn build':
I did not find very comprehensive examples about how to create this kind of reusable module with Typescript code bundled in an AWS Lambda. Please advise if there is a configuration error in the project.
Reproduction Steps
See the code at https://github.com/markusl/cdk-ecr-image-scan-handler and run 'yarn build'
What did you expect to happen?
The code should be bundled as a JSII template.
What actually happened?
I received the error.
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: