-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Severity: High — blocks all new project creation
Description
Running agentcore create fails during the "Prepare agentcore/ directory" step with an ERESOLVE error. npm install cannot resolve the dependency tree because the CDK template's package.json pins aws-cdk-lib to a version that doesn't satisfy the peer dependency required by @aws/agentcore-cdk.
Root Cause
The template at dist/assets/cdk/package.json specifies:
"aws-cdk-lib": "2.239.0"However, @aws/agentcore-cdk@0.1.0-alpha.9 (resolved from the ^0.1.0-alpha.1 range in the same template) declares a peer dependency of:
"aws-cdk-lib": "^2.243.0"
Since 2.239.0 does not satisfy ^2.243.0, npm fails.
Steps to Reproduce
- Run
agentcore createwith any project name - Observe failure at the "Prepare agentcore/ directory" step
Error Output
npm error ERESOLVE unable to resolve dependency tree
npm error peer aws-cdk-lib@"^2.243.0" from @aws/agentcore-cdk@0.1.0-alpha.9
npm error aws-cdk-lib@"2.239.0" from the root project
Suggested Fix
Update aws-cdk-lib in dist/assets/cdk/package.json (and the source template it's built from) to at least 2.243.0. Going forward, consider keeping this version in sync with the minimum peer dependency declared by @aws/agentcore-cdk, or using a compatible range (e.g. ^2.243.0) instead of a pinned version to avoid this class of issue recurring on future @aws/agentcore-cdk releases.