Summary
None of the create-blocks-app templates list the aws-cdk CLI in devDependencies — they only depend on aws-cdk-lib. Because the CLI isn't declared, the npx cdk … invocations in the deploy/watch scripts fetch it on demand on first run.
Symptoms
- First deploy prints
npm warn exec The following package was not found and will be installed: cdk@<version> and pays a first-run install latency.
- Version skew: the on-demand
cdk CLI version floats independently of the pinned aws-cdk-lib, so the CLI and the library can drift apart.
Where
Every template under packages/create-blocks-app/templates/*/package.json declares aws-cdk-lib but no aws-cdk:
auth-cognito, backend, bare, default, demo, nextjs, react
Suggested fix
Add aws-cdk to devDependencies in each template, pinned to a version aligned with that template's aws-cdk-lib.
Related: #153.
Summary
None of the
create-blocks-apptemplates list theaws-cdkCLI indevDependencies— they only depend onaws-cdk-lib. Because the CLI isn't declared, thenpx cdk …invocations in the deploy/watch scripts fetch it on demand on first run.Symptoms
npm warn exec The following package was not found and will be installed: cdk@<version>and pays a first-run install latency.cdkCLI version floats independently of the pinnedaws-cdk-lib, so the CLI and the library can drift apart.Where
Every template under
packages/create-blocks-app/templates/*/package.jsondeclaresaws-cdk-libbut noaws-cdk:auth-cognito,backend,bare,default,demo,nextjs,reactSuggested fix
Add
aws-cdktodevDependenciesin each template, pinned to a version aligned with that template'saws-cdk-lib.Related: #153.