fix(frontend): resolve npm ci ERESOLVE by downgrading TypeScript to 4.9.5 - #57
Open
github-actions[bot] wants to merge 1 commit into
Conversation
react-scripts@5.0.1 declares peerOptional typescript@"^3.2.1 || ^4". With typescript@5.8.3 in the lock file, npm ci failed with ERESOLVE. Downgrading to typescript@^4.9.5 (within the supported range) fixes the install. Also adds the lint (eslint src) and type-check (tsc --noEmit) scripts that the CI workflow invokes but were missing from package.json. 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
CI was failing in the
lint-and-testjob at the Install Node.js dependencies step with:react-scripts@5.0.1declarestypescript@^3.2.1 || ^4as a peer-optional dependency. The lock file hadtypescript@5.8.3, which is outside that range. npm 10's strict peer-dependency resolver rejects this with ERESOLVE, causingnpm cito fail.Two secondary issues were also found: the CI workflow calls
npm run lintandnpm run type-check, but neither script existed inpackage.json.Fix
frontend/package.json: Downgrade TypeScript from^5.2.2→^4.9.5(within react-scripts' supported range). Add the missinglint(eslint src --ext .ts,.tsx) andtype-check(tsc --noEmit) scripts.frontend/package-lock.json: Regenerated to lock TypeScript at 4.9.5.The frontend source code uses no TypeScript 5-specific syntax and is fully compatible with TypeScript 4.9.5 (verified by auditing all 21
.ts/.tsxfiles).Fixes the failing CI on PR #55.
🤖 Generated with Claude Code