aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

CLI dependencies are set to latest

Open stefanolczak opened this issue 7 years ago • 4 comments

: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

  1. Create package.json file mentioned here.
  2. Run: npm install
  3. Try to synth any CDK app.
  4. 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

stefanolczak avatar Aug 23 '19 08:08 stefanolczak

Related issue #3517

nija-at avatar Aug 23 '19 12:08 nija-at

Related issue: #3711.

skinny85 avatar Aug 23 '19 17:08 skinny85

running into this problem also! it's currently breaking our CI pipeline for review apps :(

shuynh avatar Aug 29 '19 22:08 shuynh

resolving this as fixed - see https://github.com/aws/jsii/pull/1141

shivlaks avatar Aug 26 '20 06:08 shivlaks