Skip to content

fix(deps): resolve TypeScript/react-scripts peer dep conflict breaking npm ci - #52

Open
github-actions[bot] wants to merge 1 commit into
chore/pin-baseline-v1from
claude-auto-fix-ci-chore/pin-baseline-v1-29568813199
Open

fix(deps): resolve TypeScript/react-scripts peer dep conflict breaking npm ci#52
github-actions[bot] wants to merge 1 commit into
chore/pin-baseline-v1from
claude-auto-fix-ci-chore/pin-baseline-v1-29568813199

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Root cause

npm ci in CI was failing with ERESOLVE because:

  • frontend/package.json pins typescript@^5.2.2 (resolves to 5.8.3)
  • react-scripts@5.0.1 declares peerOptional typescript@"^3.2.1 || ^4"
  • npm 7+'s strict peer-dep resolver treats this as a hard error

This caused the Install Node.js dependencies step to fail for all matrix entries in the lint-and-test job, which cascaded into the build-status sentinel job also failing.

Fix

Added an overrides field to frontend/package.json:

"overrides": {
  "typescript": "^5.2.2"
}

npm's overrides mechanism instructs the resolver to use TypeScript 5.x throughout the entire dependency tree, overriding react-scripts' peer dep declaration. This suppresses the ERESOLVE error without requiring --legacy-peer-deps on the npm ci command. The package-lock.json is regenerated accordingly.

Verified locally: npm ci completes successfully with the updated lockfile.

Fixes the CI failure blocking PR #51.

🤖 Generated with Claude Code

… dep conflict

react-scripts@5.0.1 declares peerOptional typescript@"^3.2.1 || ^4", but the
project uses typescript@^5.2.2 (locks to 5.8.3). npm 7+ strict peer dep
resolution treats this as an ERESOLVE error, failing `npm ci` in CI.

Adding an npm `overrides` entry for typescript tells the resolver to use
typescript@^5.2.2 throughout the tree, which suppresses ERESOLVE without
requiring --legacy-peer-deps in the CI command. Updated package-lock.json
to reflect the new resolution.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
github-actions Bot requested a review from izzywdev as a code owner July 17, 2026 09:15
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.

0 participants