Skip to content

fix(frontend): resolve TypeScript 5.x peer dep ERESOLVE on npm ci - #43

Open
github-actions[bot] wants to merge 1 commit into
feature/mfe-fuzefrontfrom
claude-auto-fix-ci-feature/mfe-fuzefront-29012481411
Open

fix(frontend): resolve TypeScript 5.x peer dep ERESOLVE on npm ci#43
github-actions[bot] wants to merge 1 commit into
feature/mfe-fuzefrontfrom
claude-auto-fix-ci-feature/mfe-fuzefront-29012481411

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Root cause

The MFE commit (befd956) added vite, @originjs/vite-plugin-federation, and @vitejs/plugin-react to frontend/package.json devDependencies but did not regenerate package-lock.json. This caused npm ci in CI to detect the lock file was out of sync and attempt a fresh dependency resolution.

During that fresh resolution, npm hit an ERESOLVE error:

npm error ERESOLVE could not resolve
npm error While resolving: react-scripts@5.0.1
npm error Found: typescript@5.8.3
npm error peerOptional typescript@"^3.2.1 || ^4" from react-scripts@5.0.1

react-scripts@5.0.1 only supports TypeScript ≤ 4.x as a peer dep, but the project uses typescript@^5.2.2. npm v7+ enforces peer deps strictly, so this fails without an explicit override.

Fix

Two changes to frontend/:

  1. package.json — added "overrides": { "typescript": "^5.2.2" }. npm's overrides field explicitly resolves the conflict, telling npm "use TypeScript 5.x regardless of peer dep constraints" and suppressing the ERESOLVE.

  2. package-lock.json — regenerated with npm install (strict mode, with overrides active) so all peer dependencies (including @testing-library/dom etc.) are present and npm ci --dry-run passes cleanly.

No TypeScript 5-specific syntax is used in the source code, so this is a safe change. Vite, @originjs/vite-plugin-federation, and @vitejs/plugin-react all work fine with the TypeScript 5 compiler.

Test plan

  • npm ci --dry-run passes in frontend/
  • CI lint-and-test job passes on the merged PR

Fixes #42

…onflict

react-scripts@5.0.1 declares peerOptional typescript@"^3.2.1 || ^4" but
the MFE work (feat: befd956) bumped typescript to ^5.2.2 without updating
package-lock.json. This caused npm ci to detect the lock file was out of
sync, attempt fresh resolution, and fail with ERESOLVE on the TypeScript
peer dep constraint.

Fix: add `overrides: { typescript: "^5.2.2" }` to package.json — npm's
overrides field explicitly resolves the conflict and suppresses ERESOLVE.
Regenerated package-lock.json with strict peer dep mode so all peer deps
(including @testing-library/dom etc.) are present and npm ci passes.

Closes: #42

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 9, 2026 10:57
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