Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@mongodb-js/zstd fails to install on 22.14 with "N-API version undefined" #57118

Closed
drunkcod opened this issue Feb 18, 2025 · 1 comment
Closed

Comments

@drunkcod
Copy link

Version

22.14

Platform

Linux & MacOS.

Subsystem

No response

What steps will reproduce the bug?

Try to install @mongodb-js/zstd using Docker.

Works on "node:22.13-bookworm-slim" fails on "node:22.14-bookworm-slim"

Looks like this:

13.44 npm error code 127
13.44 npm error path /app/node_modules/@mongodb-js/zstd
13.44 npm error command failed
13.44 npm error command sh -c prebuild-install --runtime napi || npm run clean-install
13.44 npm error > @mongodb-js/[email protected] clean-install
13.44 npm error > npm run install-zstd && npm run compile
13.44 npm error
13.44 npm error
13.44 npm error > @mongodb-js/[email protected] install-zstd
13.44 npm error > bash etc/install-zstd.sh
13.44 npm error prebuild-install warn This package does not support N-API version undefined
13.44 npm error prebuild-install warn install No prebuilt binaries found (target=undefined runtime=napi arch=arm64 libc= platform=linux)
13.44 npm error bash: etc/install-zstd.sh: No such file or directory

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior? Why is that the expected behavior?

Success.

What do you see instead?

13.44 npm error code 127
13.44 npm error path /app/node_modules/@mongodb-js/zstd
13.44 npm error command failed
13.44 npm error command sh -c prebuild-install --runtime napi || npm run clean-install
13.44 npm error > @mongodb-js/[email protected] clean-install
13.44 npm error > npm run install-zstd && npm run compile
13.44 npm error
13.44 npm error
13.44 npm error > @mongodb-js/[email protected] install-zstd
13.44 npm error > bash etc/install-zstd.sh
13.44 npm error prebuild-install warn This package does not support N-API version undefined
13.44 npm error prebuild-install warn install No prebuilt binaries found (target=undefined runtime=napi arch=arm64 libc= platform=linux)
13.44 npm error bash: etc/install-zstd.sh: No such file or directory

Additional information

No response

@drunkcod
Copy link
Author

drunkcod commented Feb 20, 2025

Ok, seems like this happens only for some repositories and lacking a clean and minimal repro I'll close it and comeback if I can find a pattern to the madness.

------ EDIT ----
And for anyone finding this issue later.
I don't know why but it seems like the culprit here is prebuild-install if you end up with 7.1.2 you'll get the undefined issue on 22.14 but not 22.13.

Ensuring you have 7.1.3 will lead to great success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant