Skip to content

fix(deps): update prebuild-install to work on Node 22.14+ #2497

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

Merged
merged 1 commit into from
Mar 29, 2025

Conversation

agilgur5
Copy link
Contributor

@agilgur5 agilgur5 commented Mar 29, 2025

Motivation

This installation error on Node 22.14+:

npm error prebuild-install warn This package does not support N-API version undefined
npm error prebuild-install warn install No prebuilt binaries found (target=undefined runtime=napi arch=x64 libc= platform=linux)

is resolved by updating to newer prebuild-install 7.1.3, which has a newer version of napi-build-utils (2.0.0) with a bugfix for newer N-API version comparison

Further Reading

This fixes the issue I noted in #2448 (comment) with the suggestion in the following comment #2448 (comment). See also prebuild/prebuild-install#203, inspiredware/napi-build-utils#6 for root cause.

Notes to Reviewers

While consumers can update their version of prebuild-install in their lockfiles independently, the version bump here will require a newer version that is backward- and forward-compatible.

Verification

This dep bump fixed the error for me in agilgur5/react-signature-canvas#132

template

Thanks for contributing!

  • Have you updated CHANGELOG.md?

This installation error on Node 22.14+:
```
npm error prebuild-install warn This package does not support N-API version undefined
npm error prebuild-install warn install No prebuilt binaries found (target=undefined runtime=napi arch=x64 libc= platform=linux)
```

is resolved by updating to newer `prebuild-install` 7.1.3, which has a newer version of `napi-build-utils` (2.0.0) with a bugfix for newer N-API version comparison
Copy link
Collaborator

@chearon chearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I hadn't realized that the version after ^ is a minimum (i.e. I thought 7.1.1 satisfies ^7.1.3). But a quick Google search shows that this should work.

@chearon chearon merged commit 367af8c into Automattic:master Mar 29, 2025
@agilgur5 agilgur5 deleted the deps-bump-prebuild-install branch March 29, 2025 21:50
@agilgur5
Copy link
Contributor Author

Indeed it is a minimum; for reference, here's the official NPM semver docs on "caret ranges"

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

Successfully merging this pull request may close these issues.

2 participants