-
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
cdk synth fails to resolve symlinks when staging assets as of 1.16.0 #4978
Comments
Getting the same here. |
I'm seeing the same problem with a TypeScript Lambda (compiled to JavaScript) which has these dependencies installed with regular npm install:
Problems are caused uuid, which sets up a symlink as .bin/uuid => ../uuid/bin/uuid. When I delete the symlink manually, deployment works. Also noteworthy that after a failed attempt, AWS CDK leaves an incomplete cdk.out/asset.xxx folder there. Next time you run it, deployment succeeds, but the folder doesn't contain node_modules, so the deployed Lambda function doesn't actually work. |
same problem here but after installing the lambda dependencies with |
Suspected as p0 so tagging as such |
@sousandrei Nope, plain npm. @kennu my typescript lambdas have just these deps:
@hanstf is probably correct as my error message also references the cli.js which is that packages |
I have this same issue, the package causing issues is I am running on a Linux container image but the project/stack directory and node_modules reside on a Windows host mounted volume. The error is related to symlinks which can be a bit funky under Windows, I imagine this is related. |
repro-ing the issue |
confirmed that this is an issue as of repro steps in TypeScript:
const hello = new lambda.Function(this, 'HelloHandler', {
runtime: lambda.Runtime.NODEJS_10_X,
code: lambda.Code.asset('lambda'),
handler: 'hello.handler'
}); Until As of looking into a fix |
I know its late on a friday, but any chance there could be a 1.16.3 release cut with this fix? |
In case anyone else sees this, just add the following to your "resolutions": {
"@aws-cdk/assets": "1.15.0",
"@aws-cdk/core": "^1.16.0",
"@aws-cdk/cx-api": "^1.16.0"
} If you have a mono-repo, place it in the root |
❓ General Issue
The Question
After upgrading from 1.15.0 to 1.16.1,
cdk synth
command fails with:fast-xml-parser
is a dependency I have underlib/resources/package.json
used by a lambda function.Any idea where those symlinks come from or what creates them? And how to clean them / regenerate them.
Also running
cdk synth
and thencdk diff
again seems to remove the issue and diff saysNo differences
. But I have same issue runningjest
for the tests for the lambda (same missing symlink warning). If I revert back to 1.15.0, both work.Environment
Other information
The text was updated successfully, but these errors were encountered: