Guidance for maintaining open source CDK project with regards to version changes

0

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?
AWS
titan09
asked 10 months ago1630 views
1 Answer
0

if I understand this correctly, you need to specify the version you need: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#dependencies More details are provided here for deployable CDK apps: https://docs.aws.amazon.com/cdk/v2/guide/manage-dependencies.html#manage-dependencies-ts-js

profile pictureAWS
EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions