Skip to content

fix(ui): unblock Cloudflare Pages build (eslint 10 peer conflict) - #24

Closed
adityak74 wants to merge 1 commit into
mainfrom
fix/pages-build-eslint-peer
Closed

fix(ui): unblock Cloudflare Pages build (eslint 10 peer conflict)#24
adityak74 wants to merge 1 commit into
mainfrom
fix/pages-build-eslint-peer

Conversation

@adityak74

Copy link
Copy Markdown
Collaborator

Problem

The Cloudflare Pages build is failing on main. It never reaches the build step — it dies during dependency install.

Reproduced locally against origin/main (018a6fc):

$ cd ui && npm ci
npm error code ERESOLVE
npm error While resolving: eslint-plugin-react-hooks@7.0.1
npm error Found: eslint@10.8.1
npm error Could not resolve dependency:
npm error peer eslint@"^3.0.0 || ... || ^9.0.0" from eslint-plugin-react-hooks@7.0.1

Root cause

A Dependabot bump moved ui/ to eslint@^10.8.1, but left eslint-plugin-react-hooks at ^7.0.1, whose peer range stops at eslint 9:

7.0.1 → ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0
7.1.1 → ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 || ^10.0.0

npm ci refuses the install, so Pages fails before vite build runs.

Fix

Bump eslint-plugin-react-hooks to ^7.1.1. That is the whole change.

I checked the rest of the eslint stack rather than bumping blindly — nothing else needed changing:

Package eslint peer range eslint 10 OK?
typescript-eslint@8.67.0 ^8.57.0 || ^9.0.0 || ^10.0.0 ✅ already
eslint-plugin-react-refresh@0.4.24 >=8.40 ✅ already
eslint-plugin-react-hooks@7.0.1 … || ^9.0.0 the blocker

Verification

Run against origin/main with this patch applied:

  • cd ui && npm ci — succeeds (was the failing step)
  • cd ui && npm run buildtsc -b && vite build, built in 357ms
  • npm ci at repo root — succeeds
  • npm run build at repo root — succeeds

Note on lint (not addressed here, and not blocking)

npm run lint reports errors, but this is pre-existing and unrelated to the deploy:

  • Baseline on origin/main (forced install via --legacy-peer-deps): 27 errors
  • With this patch: 32 errors

The 5 additional errors come from new rules shipped in react-hooks 7.1.x (react-hooks/immutability, react-hooks/error-boundaries), not from anything this PR changes in application code.

Lint is not part of the Pages build (npm run build is tsc -b && vite build) and there is no lint CI workflow, so none of this blocks the deploy. Worth a separate cleanup PR — deliberately left out of this one to keep the deploy fix minimal and easy to review.

…r range

Dependabot bumped eslint to ^10.8.1 in ui/ while leaving
eslint-plugin-react-hooks at ^7.0.1, whose peer range stops at eslint 9.
npm ci then fails with ERESOLVE, so the Cloudflare Pages build never
reaches the build step.

eslint-plugin-react-hooks 7.1.1 widens its peer range to include
^10.0.0. typescript-eslint 8.67.0 and eslint-plugin-react-refresh 0.4.24
already accept eslint 10, so this is the only change needed.

Verified against origin/main: npm ci, npm run build, and the root
package build all succeed.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying open-context with  Cloudflare Pages  Cloudflare Pages

Latest commit: 09bb830
Status: ✅  Deploy successful!
Preview URL: https://8ae38586.open-context.pages.dev
Branch Preview URL: https://fix-pages-build-eslint-peer.open-context.pages.dev

View logs

@adityak74

Copy link
Copy Markdown
Collaborator Author

Superseded by #25, which carried this fix in as 4199652. main already reads eslint-plugin-react-hooks ^7.1.1, so this PR is now a no-op.

@adityak74 adityak74 closed this Aug 18, 2026
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.

1 participant