[
https://issues.apache.org/jira/browse/KNOX-3518?focusedWorklogId=1047670&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1047670
]
ASF GitHub Bot logged work on KNOX-3518:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Oct/26 18:22
Start Date: 15/Oct/26 18:22
Worklog Time Spent: 10m
Work Description: smolnar82 opened a new pull request, #1458:
URL: https://github.com/apache/knox/pull/1458
[KNOX-3518](https://issues.apache.org/jira/browse/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.
Issue Time Tracking
-------------------
Worklog Id: (was: 1047670)
Remaining Estimate: 0h
Time Spent: 10m
> UI module builds fail with npm "Cannot read properties of null (reading
> 'edgesOut')"
> ------------------------------------------------------------------------------------
>
> Key: KNOX-3518
> URL: https://issues.apache.org/jira/browse/KNOX-3518
> Project: Apache Knox
> Issue Type: Bug
> Affects Versions: 3.1.0
> Reporter: Sandor Molnar
> Assignee: Sandor Molnar
> Priority: Major
> Fix For: 3.1.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Since vitest 4.1.12 was published (2026-10-15), npm install fails in every
> Angular UI module, which breaks the full Maven build:
> [INFO] Running 'npm install' in .../gateway-admin-ui
> [INFO] npm error Cannot read properties of null (reading 'edgesOut')
> [ERROR] Failed to execute goal
> com.github.eirslett:frontend-maven-plugin:1.15.1:npm (npm install) on project
> gateway-admin-ui
> Affected modules: gateway-admin-ui, knox-homepage-ui,
> knox-token-management-ui, knox-token-generation-ui, knox-webshell-ui.
> *Root cause:*
> - The UI poms delete package-lock.json on clean, so every build resolves
> dependencies fresh from the registry.
> - @angular/build, which the token UIs pull in through
> @angular-devkit/build-angular, declares vitest ^4.0.8 as an optional peer.
> - vitest 4.1.12 declares the optional peer @vitest/browser-webdriverio
> ^4.1.11. Version 4.1.12 of that package was never published, so npm picks
> 4.1.11, which requires exactly vitest 4.1.11.
> - The npm bundled with Node v22.20.0 (npm 10.9.3) crashes in
> Arborist#loadPeerSet on this conflict instead of reporting ERESOLVE.
> *Fix:* add "overrides":
> {code:java}
> { "vitest": "4.1.11" }{code}
> to the {{package.json}} of each UI module. None of the UIs uses vitest, so
> the build output doesn't change. The override can be removed once vitest
> publishes a consistent release.
> Reproduced on master with{{ npm install --dry-run}} on each UI's
> package.json: all five fail without the override and resolve with it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)