Skip to content

fix(frontend): resolve TypeScript 5 peer dep conflict breaking npm ci - #56

Open
github-actions[bot] wants to merge 1 commit into
chore/a2a-maintainer-onboardfrom
claude-auto-fix-ci-chore/a2a-maintainer-onboard-30069185843
Open

fix(frontend): resolve TypeScript 5 peer dep conflict breaking npm ci#56
github-actions[bot] wants to merge 1 commit into
chore/a2a-maintainer-onboardfrom
claude-auto-fix-ci-chore/a2a-maintainer-onboard-30069185843

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Root cause

npm ci was failing with ERESOLVE in the lint-and-test job on Node 18+ runners:

npm error peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1
npm error Conflicting peer dependency: typescript@4.9.5

react-scripts@5.0.1 is unmaintained and only declares support for TypeScript ^3.2.1 || ^4 as a peer dependency. The project uses typescript@^5.2.2 (locked at 5.8.3). npm 8+ (Node 18+ runners) enforces peer dependencies strictly by default, so npm ci exits non-zero.

The build-status job then fails as a cascade because lint-and-test failed.

Fix

Added an npm overrides field to frontend/package.json:

"overrides": {
  "typescript": "$typescript"
}

The $typescript reference resolves to the version declared in dependencies (^5.2.2), telling npm to use TypeScript 5 everywhere in the tree and suppress the peer dep conflict. The package-lock.json was regenerated with npm install --package-lock-only to reflect the new resolution (TypeScript version stays at 5.8.3, react-scripts stays at 5.0.1). Verified with npm ci --dry-run — no ERESOLVE.

Closes / unblocks #55.

…flict

react-scripts@5.0.1 declares peerOptional typescript@"^3.2.1 || ^4" but
the project uses typescript@^5.2.2 (5.8.3 locked). npm 8+ enforces peer
deps strictly and causes npm ci to fail with ERESOLVE on Node 18+ runners.

Adding "overrides": { "typescript": "$typescript" } to package.json tells
npm to use the project's declared TypeScript version everywhere in the tree,
suppressing the conflict. The package-lock.json is regenerated to match.

Fixes: CI lint-and-test job failure in PR #55.

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 24, 2026 05:26
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