[
https://issues.apache.org/jira/browse/KNOX-3518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127608#comment-18127608
]
ASF subversion and git services commented on KNOX-3518:
-------------------------------------------------------
Commit 962e3ee6b534262d517161581791b42df93becc3 in knox's branch
refs/heads/master from Sandor Molnar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=962e3ee6b ]
KNOX-3518: Pin vitest to 4.1.11 to work around npm peer-resolution crash in UI
builds (#1458)
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 <[email protected]>
> 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)