Skip to content

Repair the CDK deployment toolchain - #2068

Merged
KyleOps merged 1 commit into
mainfrom
fix-cdk-deployment-toolchain
Jul 31, 2026
Merged

Repair the CDK deployment toolchain#2068
KyleOps merged 1 commit into
mainfrom
fix-cdk-deployment-toolchain

Conversation

@KyleOps

@KyleOps KyleOps commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Problem

The deployment steps documented in deployment/ehr-proxy/README.md and deployment/forms-server/README.md cannot be followed from a clean checkout. Both npm run build and cdk diff fail, for two unrelated reasons.

1. Compilation fails in all six deployment packages.

../../../node_modules/aws-cdk-lib/core/lib/private/perf.d.ts(46,77):
  error TS2304: Cannot find name 'Disposable'.

The tsconfigs target ES2020 and never set skipLibCheck, so tsc type checks a dependency's .d.ts files against a lib that predates the symbols they use. skipLibCheck is the CDK project default and what the library expects.

2. The CDK CLI cannot read its own library's output.

This CDK CLI is not compatible with the CDK library used by your application.
(Cloud assembly schema version mismatch: Maximum schema version supported is
 48.x.x, but found 54.0.0. You need at least CLI version 2.1128.0.)

The CLI is pinned at ^2.1031.0 while aws-cdk-lib is 2.260.0. Raised to ^2.1134.0, the current release.

Scope

Both problems predate the RDS work in #2065 and #2066. I confirmed this by checking out the commit before #2065 and reproducing the identical build error, and by reading the CLI and library versions out of that commit's lock file, which already pins the same incompatible pair.

The change is one line per tsconfig, the CLI range in six package.json files, and a lock file update whose only version change is:

node_modules/aws-cdk  2.1031.0 -> 2.1134.0
added: 0  removed: 0

Verification

With only the repo's own toolchain, no workarounds:

  • npm run build succeeds in all six deployment packages.
  • npx cdk diff runs against the live stacks and correctly reports the pending Back the HAPI FHIR servers with RDS PostgreSQL #2065 changes (6 RDS-related additions per stack, no deletions).
  • npm ci, npm run lint and npm run prettier all pass.

Follow-up, not in this PR

The construct packages declare aws-cdk (the CLI) under dependencies rather than devDependencies, which pulls the whole CLI into anything consuming them. Worth tidying, but it changes the dependency graph and is unrelated to unbreaking the build.

Neither `npm run build` nor `cdk diff` currently works in the deployment
packages, so the deployment steps in the ehr-proxy and forms-server READMEs
cannot be followed from a clean checkout. Two independent causes:

Compilation fails in every deployment package with "Cannot find name
'Disposable'" from aws-cdk-lib's core/lib/private/perf.d.ts. The tsconfigs
target ES2020 and do not set skipLibCheck, so tsc type checks a dependency's
declaration files against a lib that predates the symbols they use. Set
skipLibCheck, which is the CDK project default and what the library expects.

The CDK CLI is pinned at 2.1031.0 while aws-cdk-lib is 2.260.0. The library now
emits a cloud assembly with schema version 54, and a CLI that old reads at most
schema 48, so every synth ends in "This CDK CLI is not compatible with the CDK
library used by your application". Raise the CLI to ^2.1134.0; schema 54
requires at least 2.1128.0.

Both predate the RDS work and affect all six deployment packages equally. With
these changes `npm run build` succeeds in all six and `cdk diff` runs against
the deployed stacks using only the repo's own toolchain.
@KyleOps
KyleOps merged commit ed6f95c into main Jul 31, 2026
11 checks passed
@KyleOps
KyleOps deleted the fix-cdk-deployment-toolchain branch July 31, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant