question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CDK CLI and Cloud Assembly Version Mismatch issue.....

See original GitHub issue

Hi, Am unable to figure out the compatibility matrix of @aws-cdk/core" and cdk cli. Its weird but no matter what combination i try am ending up with below error: This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version. (Cloud assembly schema version mismatch: Maximum schema version supported is 7.0.0, but found 8.0.0)

Here are the steps:

  1. Login to CodeArtifact repo.
  2. Copy package from my repo. package.json is copied below.
  3. npm install
  4. npm run build (since its a lambda repo)
  5. cdk synth
  6. cdk deploy

package.json “dependencies”: { “@aws-cdk/aws-appsync”: “^1.81.0”, “@aws-cdk/aws-ec2”: “^1.81.0”, “@aws-cdk/aws-iam”: “^1.81.0”, “@aws-cdk/aws-lambda”: “^1.81.0”, “@aws-cdk/aws-logs”: “^1.81.0”, “@aws-cdk/core”: “^1.81.0”, “dotenv”: “^8.2.0”, “fs”: “0.0.1-security”, “source-map-support”: “^0.5.16” }

CLI version- + aws-cdk@1.85.0

Other version combinations which gave same error:

  1. Have tried above package.json with even other cdk version (1.81.0 (build 6ef67c7)), got same error.
  2. Have tried changing package.json versions to 1.85 with cdk version (1.81.0 (build 6ef67c7) & 1.85.0), got same error.

Please assist how to fix and where can i see this CLI to assemble version mapping.

Thanks Vikrant

The Question

Environment

  • CDK CLI Version:
  • Module Version:
  • Node.js Version:
  • OS:
  • Language (Version):

Other information

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
1kingscommented, Jan 22, 2021

Solved! exact same issue, mine version 1.86.0 npm i -g aws-cdk@latest is pointless. Solution: downgrade run cdk --version use output version (got 1.82.0) to update all aws-cdk dependencies in package.json

1reaction
NetaNircommented, Jan 21, 2021

I suspect that you are not using CDK CLI version 1.85.0 but an earlier version. The aws-cdk declares a dependency on the @aws-cdk/cloud-assembly-schema module, see code. When the AWS CDK is released, all of the modules are released together and their dependencies are update to the same released version. In the CDK CLI case (the aws-cdk module), this means that version 1.85.0 of the module, will declare a dependency on @aws-cdk/cloud-assembly-schema version 1.85.0. The version file of version 1.85.0 of the @aws-cdk/cloud-assembly-schema:

https://github.com/aws/aws-cdk/blob/5f446681aa8ae9867f8ca03d48916a05736ee62e/packages/%40aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json#L1

Which means that if version 1.85.0 of the aws-cdk module is installed you will not see the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

‼️ NOTICE: aws-cdk CLI - "Cloud assembly schema version ...
NOTICE: aws-cdk CLI - "Cloud assembly schema version mismatch: Maximum schema version supported is 10.0.0, but found 11.0.0" #14738.
Read more >
How to solve CDK CLI version mismatch - Stack Overflow
I encountered this issue with a typescript package, after upgrading the cdk in package.json. As Maciej noted upgrading did not seem to work....
Read more >
API reference - AWS Cloud Development Kit (AWS CDK) v2
Cloud assembly schema version mismatch: Maximum schema version supported is 3.0.0, but found 4.0.0. Please upgrade your CLI in order to interact with...
Read more >
@aws-cdk/cloud-assembly-schema - npm
It defines the set of instructions that are needed in order to deploy the assembly directory. For example, when cdk deploy is executed,...
Read more >
Migrating to AWS CDK v2 - the missing GO manual
Please upgrade the CLI to the latest version. (Cloud assembly schema version mismatch: Maximum schema version supported is 9.0.0, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found