[@aws-cdk/aws-lambda-nodejs] Bundle fails on 1.58 due to incorrect path. #9709
Labels
@aws-cdk/aws-lambda-nodejs
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
needs-triage
This issue or PR still needs to be triaged.
p1
This is similar to #9673. Though I think that specific error can be resolved by clearing the output cache.
Synth/Deploy fails when using NodeJSFunction on 1.58. Project synthed and deployed fine on 1.56.
Reproduction Steps
Upgraded to 1.58 with NodeJSFunction.
cdk synth
What did you expect to happen?
Bundle NodeJSFunction code and synth.
What actually happened?
At first I received:
Tried to change the name of my entry point
cdk synth
Same error as #9673. Notice that this is the old path. Deleted
/.cdk.staging
,cdk.out
,.parcel-cache
.cdk synth
Bundling asset MyStack/myFunction/Code/Stage... Building index2.ts... Bundling... Packaging index.js... Optimizing index.js... ✨ Built in 3.21s ../../../../asset-output/index.js 4.3 KB 743ms mv: cannot stat ‘/asset-output/index2.js’: No such file or directory
Notice it is looking for
index2.js
and notindex.js
.Environment
Other
It looks like NodeJSFunction or assets are confusing the file name of the entry point with the computed
/asset-output/index.js
. Using an entry point calledindex.ts
has a different error than when the entry point is named something unique. I am also curious if the folder depth matters, but it doesn't seem to since I already am 4 layers deep.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: