fix(deps): resolve TypeScript/react-scripts peer dep conflict breaking npm ci - #52
Open
github-actions[bot] wants to merge 1 commit into
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
npm ciin CI was failing withERESOLVEbecause:frontend/package.jsonpinstypescript@^5.2.2(resolves to 5.8.3)react-scripts@5.0.1declarespeerOptional typescript@"^3.2.1 || ^4"This caused the
Install Node.js dependenciesstep to fail for all matrix entries in thelint-and-testjob, which cascaded into thebuild-statussentinel job also failing.Fix
Added an
overridesfield tofrontend/package.json:npm's
overridesmechanism 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-depson thenpm cicommand. Thepackage-lock.jsonis regenerated accordingly.Verified locally:
npm cicompletes successfully with the updated lockfile.Fixes the CI failure blocking PR #51.
🤖 Generated with Claude Code