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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to