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
已提问 10 个月前1667 查看次数
1 回答
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
专家
已回答 10 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则