Skip to content

fix(deps): apply zod-validation-error override to unbreak ESLint#427

Closed
mremond wants to merge 1 commit into
mainfrom
fix/eslint-react-hooks-zod-v4
Closed

fix(deps): apply zod-validation-error override to unbreak ESLint#427
mremond wants to merge 1 commit into
mainfrom
fix/eslint-react-hooks-zod-v4

Conversation

@mremond
Copy link
Copy Markdown
Member

@mremond mremond commented Jun 1, 2026

Summary

npm run lint crashes in the @xmpp/fluux workspace with:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined
by "exports" in node_modules/zod-validation-error/package.json

Root cause: eslint-plugin-react-hooks@7.1.1 (pulled in by a recent dependency bump) hard-imports zod-validation-error/v4 — a subpath that only exists in zod-validation-error v4. The plugin's declared range (^3.5.0 || ^4.0.0) is too permissive, so npm kept the already-resolved 3.5.4, which exports only ..

The root package.json already pins zod-validation-error: 4.0.2 via overrides (added during the React 19 migration in e3dfe4c), but the lockfile was never regenerated to honor it — so 3.5.4 stayed resolved and the import crashed.

Fix: pin the single zod-validation-error lockfile entry to 4.0.2. Its peer requirement zod: ^3.25.0 || ^4.0.0 is satisfied by the project's zod@3.25.76, and 4.0.2 exposes the ./v4 subpath react-hooks needs. The change is deliberately scoped to that one entry — no other dependency resolutions move (avoids bundling incidental within-range bumps into this fix).

eslint-plugin-react-hooks@7.1.1 hard-imports `zod-validation-error/v4`, a
subpath that only exists in zod-validation-error v4. The root package.json
already pins `zod-validation-error: 4.0.2` via overrides (added during the
React 19 migration, e3dfe4c), but the lockfile was never regenerated — so
3.5.4 stayed resolved, and 3.5.4 only exports `.`, making `npm run lint`
crash with ERR_PACKAGE_PATH_NOT_EXPORTED in the @xmpp/fluux workspace.

Pin only the zod-validation-error lockfile entry to 4.0.2 (its peer
`zod: ^3.25.0 || ^4.0.0` is satisfied by the project's zod 3.25.76). No
other dependency resolutions change.
@mremond mremond closed this Jun 1, 2026
@mremond mremond deleted the fix/eslint-react-hooks-zod-v4 branch June 1, 2026 10:04
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