aws-cdk: [cli] Cloud assembly schema version mismatch

❓ General Issue

The Question

I installed aws-cdk.aws-athena. Now the stack is not able to be synthesized with the following 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 6.0.0, but found 7.0.0)

I tried npm install -g aws-cdk to upgrade the CDK CLI but the error remains.

Environment

  • CDK CLI Version: 1.72.0
  • Node.js Version: v15.2.0
  • OS: OSX

Other information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 8
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Faced the same issue. Fixed by : pip install -r requirements.txt

Hi @nemanjko - Thanks for the challenge. I have some results, but I am not sure if we still can qualify them as “elegant”.

Refusing to start removing all, I wanted to explore what could be causing the issue. The error message says that you need to upgrade your CDK CLI, but we both did it and the error persisted.

What I have seen in my case is, even if I ran:

npm -i --force -g aws-cdk

and got a successful installation of v1.74.0, the output of cdk --version was still v.1.72.0. What was happening was that the symbolic link was pointing to a wrong path (I don’t know why).

They way I fixed the problem was:

CDK_PATH=`which cdk`
rm $CDK_PATH
CDK_NODE_PATH=`npm get prefix 2> /dev/null`/bin/cdk
ln -s $CDK_NODE_PATH $CDK_PATH

I hope this brings some information to find the root cause (points to NPM though) and help other people.

Had the same issue - for me, this fixed the issue: npm install -g aws-cdk

Happens when there’s a mismatch between global cdk and local cdk version. Upgrade all of 'em to resolve

I solved this by upgrading my version of node from 12 to 14 (with nvm) for cdk 1.109.0.

This CDK CLI is not compatible with the CDK library used by your application. This might somehow mean your local version of node is too old for your cdk config…