Skip to content

KNOX-3518: Pin vitest to 4.1.11 to work around npm peer-resolution crash in UI builds - #1458

Merged
smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3518
Oct 15, 2026
Merged

smolnar82 merged 1 commit into
apache:masterfrom
smolnar82:KNOX-3518

Conversation

@smolnar82

Copy link
Copy Markdown
Contributor

KNOX-3518 - Pin vitest to 4.1.11 to work around npm peer-resolution crash in UI builds

What changes were proposed in this pull request?

Since vitest 4.1.12 was published (2026-10-15), npm install fails in every Angular UI module with npm error Cannot read properties of null (reading 'edgesOut'), which breaks the full Maven build.

@angular/build declares vitest as an optional peer. vitest 4.1.12 declares the optional peer @vitest/browser-webdriverio ^4.1.11, which only exists as 4.1.11 and requires exactly vitest 4.1.11. The npm bundled with Node v22.20.0 (npm 10.9.3) crashes on this conflict instead of reporting ERESOLVE. The UI poms delete package-lock.json on clean, so every build hits it.

This PR adds "overrides": { "vitest": "4.1.11" } to gateway-admin-ui, knox-homepage-ui, knox-token-management-ui, knox-token-generation-ui and knox-webshell-ui. None of them uses vitest, so the build output is unchanged. The override can be removed once vitest publishes a consistent release.

How was this patch tested?

  • Reproduced the failure on master with npm install --dry-run on each UI's package.json (Node v22.20.0 / npm 10.9.3). All 5 UIs fail without the override and resolve with it.
  • mvn -pl gateway-admin-ui,knox-homepage-ui,knox-token-management-ui,knox-token-generation-ui,knox-webshell-ui clean install -DskipTests passed. clean removes the lockfiles and node_modules, so dependencies resolved from scratch.
  • Checked that vitest doesn't end up in any generated lockfile.

Integration Tests

None added. This is a build-dependency pin with no runtime effect.

…ash in UI builds

Since vitest 4.1.12 was published, `npm install` fails in every Angular
UI module with "Cannot read properties of null (reading 'edgesOut')".

@angular/build declares vitest as an optional peer. vitest 4.1.12
declares the optional peer @vitest/browser-webdriverio ^4.1.11, which
only exists as 4.1.11 and requires vitest 4.1.11 exactly. The npm
bundled with Node v22.20.0 (10.9.3) crashes on that conflict instead of
reporting ERESOLVE. The UI poms delete package-lock.json on clean, so
every build hits it.

Override vitest to 4.1.11 in all UI modules. None of them uses vitest,
so the build output is unchanged; the override can be removed once
vitest publishes a consistent release.

Co-Authored-By: Claude <noreply@anthropic.com>
@smolnar82 smolnar82 self-assigned this Oct 15, 2026
@smolnar82
smolnar82 merged commit 962e3ee into apache:master Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant