Skip to content

@keycloak/keycloak-admin-client fails to install in version 26.6.0 #47904

@stuikomma

Description

@stuikomma

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

admin/client-js

Describe the bug

When trying to npm install @keycloak/keycloak-admin-client@26.6.0 you get an error in the postinstall.

First, there now appears to be an implicit peer dependency on "wireit": "^0.14.12" and "@kiota-community/kiota-gen": "^1.0.2" as can be seen here

"command": "kiota generate -l typescript -d openapi.yaml -c AdminClient -n ApiSdk -o ./src/generated --clean-output",

But even if you provide those, the openapi.yml is missing from the published package.

Could we do without the postinstall step and without adding these new dependencies?

Version

26.6.0

Regression

  • The issue is a regression

Expected behavior

the package should install cleanly.

Actual behavior

> npm install @keycloak/keycloak-admin-client@26.6.0
npm error code 1
npm error path ...test/node_modules/@keycloak/keycloak-admin-client
npm error command failed
npm error command sh -c pnpm generate:openapi
npm error > @keycloak/keycloak-admin-client@26.6.0 generate:openapi .../node_modules/@keycloak/keycloak-admin-client
npm error > wireit
npm error
npm error  ELIFECYCLE  Command failed.
npm error  WARN   Local package.json exists, but node_modules missing, did you mean to install?
npm error sh: wireit: command not found
npm error A complete log of this run can be found in: ...

And after providing wireit and kiota:

root@3ca89ed5c6e8:~/foo# npm install @keycloak/keycloak-admin-client@26.6.0
npm error code 1
npm error path /root/foo/node_modules/@keycloak/keycloak-admin-client
npm error command failed
npm error command sh -c pnpm generate:openapi
npm error > @keycloak/keycloak-admin-client@26.6.0 generate:openapi /root/foo/node_modules/@keycloak/keycloak-admin-client
npm error > wireit
npm error
npm error Downloading Kiota binary from https://github.com/microsoft/kiota/releases/download/v1.30.0/linux-arm64.zip
npm error Kiota binary version v1.30.0 downloaded at /root/foo/node_modules/@keycloak/keycloak-admin-client/.kiota/kiota-v1.30.0
npm error ---
npm error Executing Kiota CLI using:
npm error     Kiota version: v1.30.0
npm error     Platform: linux
npm error     Architecture: arm64
npm error ---
npm error /root/foo/node_modules/@keycloak/keycloak-admin-client/.kiota/v1.30.0/kiota generate -l typescript -d openapi.yaml -c AdminClient -n ApiSdk -o ./src/generated --clean-output
npm error Warning: the TypeScript language is in preview (Preview) some features are not fully supported and source breaking changes will happen with future updates.
npm error crit: Kiota.Builder.KiotaBuilder[0]
npm error       error generating the client: Could not open the file at /root/foo/node_modules/@keycloak/keycloak-admin-client/openapi.yaml, reason: Could not find file '/root/foo/node_modules/@keycloak/keycloak-admin-client/openapi.yaml'.
npm error  ELIFECYCLE  Command failed with exit code 1.
npm error  WARN   Local package.json exists, but node_modules missing, did you mean to install?
npm error Analyzing
npm error Error: Kiota failed.
npm error     at /root/foo/node_modules/@kiota-community/kiota-gen/bin/kiota.js:238:24
npm error     at /root/foo/node_modules/shelljs/src/exec.js:145:9
npm error     at ChildProcess.exithandler (node:child_process:422:5)
npm error     at ChildProcess.emit (node:events:507:28)
npm error     at maybeClose (node:internal/child_process:1101:16)
npm error     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm error
npm error ❌ [generate:openapi] exited with exit code 1.
npm error ❌ 1 script failed.
npm error A complete log of this run can be found in: /root/.npm/_logs/2026-04-09T12_36_56_459Z-debug-0.log

How to Reproduce?

npm install @keycloak/keycloak-admin-client@26.6.0

or

docker run -it --entrypoint sh node:24.3-alpine
npm i -g pnpm
npm init
npm install wireit @kiota-community/kiota-gen @keycloak/keycloak-admin-client@26.6.0

Anything else?

No response

Metadata

Metadata

Assignees

Type

No fields configured for bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions