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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠