cdk pipe-line gets errors

Solution 1:

Your problem may be mismatched package.json cdk dependency versions. The core package (where Construct lives in v1) is set to be exactly version 1.74, which won't match the the pipeline's version. This sometimes causes compatability errors. To fix it, add a ^ to all your @aws-cdk dependencies.

"@aws-cdk/core": "1.74.0"           // exactly 1.74
"@aws-cdk/pipelines": "^1.95.1"     // compatible with v1.95

The current CDK versions are 1.137 and 2.3.0 (as of Jan 2022).