CLI dependencies are set to latest
:bug: Bug Report
What is the problem?
We are trying to force CDK CLI version by using package.json file on repository that looks like that:
{
"dependencies": {
"aws-cdk": "1.4.0"
}
}
We thought it is sufficient to force CDK CLI version to specified one but with release of CDK 1.5.0 we realised it is not. The problem is that aws-cdk module has some dependencies ( @aws-cdk/cloudformation-diff, @aws-cdk/cx-api, @aws-cdk/region-info ) marked as >= 1.4.0 which will result in installing them with 1.5.0 version which is not compatible with 1.4.0. Also one of the dependencies ( @aws-cdk/cloudformation-diff ) has dependency @aws-cdk/cfnspec marked as >= 1.4.0. I guess its better to mark the dependencies to match the version of aws-cdk module instead of allowing to install latest ones.
Reproduction Steps
- Create package.json file mentioned here.
- Run:
npm install - Try to synth any CDK app.
- Notice that there are errors like that:
jsii.errors.JavaScriptError:
TypeError: builder.build is not a function
at Function.synth (/tmp/jsii-kernel-sVWgHJ/node_modules/@aws-cdk/core/lib/construct.js:74:24)
at App.synth (/tmp/jsii-kernel-sVWgHJ/node_modules/@aws-cdk/core/lib/app.js:67:52)
Environment
- CDK CLI Version: 1.4.0
- OS: all
- Language: all
Related issue #3517
Related issue: #3711.
running into this problem also! it's currently breaking our CI pipeline for review apps :(
resolving this as fixed - see https://github.com/aws/jsii/pull/1141