-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
30717 (lambda-nodejs): breaking change in esbuild causes import module error
Overview: ESBuild released a breaking change on version 0.22.0 that
changed the default bundling behavior. `lambda-nodejs`'s
`NodeJsFunction` now to fails to synthesize with the error
message `Runtime.ImportModuleError: Cannot find module
'module'`. This issue exists on all CDK versions up to and
including `2.147.2`. The workaround is either pin the
esbuild version to ~0.21 or add `--packages=bundle` to
`bundling.esbuildArgs` property (this option only works for
esbuild version >= `0.22.0`).
Affected versions: aws-cdk-lib.aws_lambda_nodejs.: >=2.0.0 <= 2.147.2
More information at: https://github.com/aws/aws-cdk/issues/30717
Metadata
Metadata
Assignees
Labels
No labels