CDK CLI and Cloud Assembly Version Mismatch issue.....
See original GitHub issueHi, 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:
- Login to CodeArtifact repo.
- Copy package from my repo. package.json is copied below.
- npm install
- npm run build (since its a lambda repo)
- cdk synth
- 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:
- Have tried above package.json with even other cdk version (1.81.0 (build 6ef67c7)), got same error.
- 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:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Solved! exact same issue, mine version 1.86.0
npm i -g aws-cdk@latest
is pointless. Solution: downgrade runcdk --version
use output version (got 1.82.0) to update all aws-cdk dependencies in package.jsonI 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 version1.85.0
of the module, will declare a dependency on@aws-cdk/cloud-assembly-schema
version1.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.