-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-cdk-lib): cdk commands hang on Yarn install step when using Runtime.NODEJS_20_X #28578
Comments
I guess this is because the default bundling base image is
|
As far as I understand, setting the runtime parameter to Runtime.NODEJS20_X does exactly that, it sets the IMAGE ARG to sam/build-nodejs18.x. I am not familiar enough with the internals of aws-cdk though. |
The issue went away after updating to MacOS Sonoma 14.2.1, which seem to point similar kinds of OpenSSL issues as with aws/aws-sam-build-images#116 but I don't think one can pass build args anyway. Next run did hang on |
This is not correct - the IMAGE argument is set automatically depending on the runtime selected. You can see in the log that the image being used is |
@petetnt you can add |
Describe the bug
I am trying to run
cdk
commands, such ascdk diff
on a stack that containsNodejsFunction
s withruntime
s set toRuntime.NODEJS_20_X
. However, the commands always hang when the build image,public.ecr.aws/sam/build-nodejs20.x@sha256:f09695497aac919ac48544640265
tries to installyarn
:If
runtime
is set toRuntime.NODEJS_18_X
, yarn is installed correctly.Also if one just takes the Dockerfile from https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-lambda-nodejs/lib/Dockerfile and sets ARG IMAGE=IMAGE=public.ecr.aws/sam/build-nodejs20.x, the
yarn
install step completes successfully.Expected Behavior
Yarn is installed within seconds and the build continues.
Current Behavior
RUN npm install --global [email protected]
step continues indefinitelyReproduction Steps
Create a project that has a
NodeJSFunction
in it:Run
cdk diff --profile myprofile
Possible Solution
No response
Additional Information/Context
Might be related to aws/aws-sam-build-images#116
CDK CLI Version
2.118.0 (build a40f2ec)
Framework Version
2.117.0
Node.js Version
v20.10.0
OS
macOS 13.1
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: