Hi, I ran into an issue with CDK in a project that we released to Github only 3 months ago. It seems like the global CDK version has progressed too much for the project version.
I fixed it, by downgrading my global CDK version. My question is, how do I modify the app so that others don’t run into this too?
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 21.0.0, but found 31.0.0)
Steps to fix:
npm uninstall -g aws-cdk
npm install -g aws-cdk@2.51.0
rm -fr node_modules package-lock.json cdk.out
npm run install:all
npm run cdk:deploy
Are there best practices for maintaining CDK projects in open source?
- Ask users to install a specific version of CDK as a part of the prerequisites?
- Or update the dependancies, so that the version is always the newest? This means that the maintaining team would expect to update a CDK project every X number of months.
- Or is there someway to have the user use a specific version of CDK for this project only?