Closed kristiandreher closed 2 months ago
Thank you, @kristiandreher, for reporting the issue.
I will try to reproduce the problem. If, by any chance, you already have a sample project, that would help.
I hopefully made the same environment as you have: https://github.com/ServerlessLife/lambda-live-debugger/tree/44-fix-CDK-ES-module/test/cdk-esm
CDK with ES modules is not officially supported. I guess you used the tsx npm module and modified the cdk.json the same way I did.
I managed to reproduce the problem and fix it.
I will do some more testing tomorrow and then merge the PR.
Great! Yes, I am using tsx and the env you have created looks similar to mine. I was not aware that CDK with ES modules is not officially supported. We have been using it for a while without any problems.
I see that my fix breaks other less standard CDK configurations. I will need a little time to find the solution.
The issue is fixed. Can you verify?
The fix works! Thanks a lot!
Thanks for a really cool project!
However when trying to debug a CDK ES module project that uses import.meta to resolve dirname lld throws an error.
lib/esm-test-app-stack: