Skip to content

Pin aws-cdk CLI as a template devDependency (avoid npx auto-install + version skew) #228

Description

@pranavosu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesPull requests that update a dependency filepending-maintainer-responseWaiting on a response from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions