-
Type:
Build Failure
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
The Node Latest tasks (at time of writing v23.6.0 is latest) fail when installing zstd with the following error trace:
[2025/01/09 11:28:22.107] + npm install '' [2025/01/09 11:28:22.107] npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. [2025/01/09 11:28:22.209] npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported [2025/01/09 11:28:22.261] npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported [2025/01/09 11:28:22.269] npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported [2025/01/09 11:28:22.270] npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported [2025/01/09 11:28:22.270] npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported [2025/01/09 11:28:24.255] npm ERR! code 127 [2025/01/09 11:28:24.255] npm ERR! path /data/mci/cab254a44999e608b8a28232230f9e73/src/node_modules/@mongodb-js/zstd [2025/01/09 11:28:24.256] npm ERR! command failed [2025/01/09 11:28:24.256] npm ERR! command sh -c prebuild-install --runtime napi || npm run clean-install [2025/01/09 11:28:24.256] npm ERR! > @mongodb-js/zstd@2.0.0 clean-install [2025/01/09 11:28:24.256] npm ERR! > npm run install-zstd && npm run compile [2025/01/09 11:28:24.256] npm ERR![2025/01/09 11:28:24.256] npm ERR! [2025/01/09 11:28:24.256] npm ERR! > @mongodb-js/zstd@2.0.0 install-zstd [2025/01/09 11:28:24.256] npm ERR! > bash etc/install-zstd.sh [2025/01/09 11:28:24.256] npm ERR! prebuild-install warn This package does not support N-API version undefined [2025/01/09 11:28:24.256] npm ERR! prebuild-install warn install No prebuilt binaries found (target=undefined runtime=napi arch=x64 libc= platform=linux) [2025/01/09 11:28:24.256] npm ERR! bash: etc/install-zstd.sh: No such file or directory
The root cause has been determined to be that a change in 23.6.0 has broken prebuild-install's ability to detect the N-API version that should be used and so fails to correctly use the prebuild
Additional context:
So far this has been tested on linux environments (ubuntu) and MacOS and only seems to reproduce in the linux environments (both locally and in CI)
Approaches that were tried: * Setting the NAPI version via the "defines" key in the binding.gyp file - didn't work
- Setting the NAPI version by updating the "prebuild" script in the package.json - didn't work
- Setting the NAPI version by setting the npm_config_target environment variable to 4 (the version we use in zstd) - this works
This seems like it's an issue with prebuild-install that got surfaced with the changes that got made in Node v23.6.0, which probably points to a bug in Node as this works fine in v23.5.0.
Steps to reproduce locally:
1. switch node version to 23.6.0
2. navigate to driver repository
3. run npm install
Note that this issue also currently affects mongodb-client-encryption
- is related to
-
NODE-6644 Skip Node Latest tests and set resource management tests to run on Node 22
-
- Closed
-