Summary
Every @basetenlabs/performance-client release after 0.0.10 is published without its platform optionalDependencies, so require() fails with Cannot find native binding on every platform. The platform packages are built and present on npm — nothing declares a dependency on them, so no package manager installs them.
0.0.10 (2025-08-07) is the last usable release. The current latest, 0.1.2, has been broken since 2026-01-28.
Reproduction
mkdir /tmp/bt && cd /tmp/bt && npm init -y
npm i @basetenlabs/performance-client@0.1.2
node -e "require('@basetenlabs/performance-client')"
Error: Cannot find native binding. npm has a bug related to optional dependencies
(https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing
both package-lock.json and node_modules directory.
[cause]: Error: Cannot find module '@basetenlabs/performance-client-darwin-arm64'
cause: Error: Cannot find module './performance-client.darwin-arm64.node'
Reproduced on macOS arm64 with npm 11.6.2 and pnpm 10.33.4. Note that npm i reports added 1 package — no platform package is considered at all.
The error text blames the npm optional-dependency bug, but that isn't the cause here: there is no optional dependency for a package manager to skip.
Cause
optionalDependencies is absent from the published manifest:
$ npm view @basetenlabs/performance-client@0.0.10 optionalDependencies --json | jq 'length'
16
$ npm view @basetenlabs/performance-client@0.1.2 optionalDependencies --json
(empty)
Across every release since 0.0.10:
| version |
published |
platform optionalDependencies |
0.0.10 |
2025-08-07 |
16 ✅ |
0.0.18-rc0 |
2025-12-19 |
0 ❌ |
0.1.0 |
2025-12-20 |
0 ❌ |
0.1.1-rc0 |
2025-12-26 |
0 ❌ |
0.1.2 |
2026-01-28 |
0 ❌ |
The binaries themselves publish fine — @basetenlabs/performance-client-darwin-arm64@0.1.2 exists and works once fetched:
npm pack @basetenlabs/performance-client-darwin-arm64@0.1.2
# extract, drop performance-client.darwin-arm64.node into the main package dir
node -e "require('@basetenlabs/performance-client')" # now succeeds
So napi prepublish -t npm is uploading the platform artifacts but not writing them back into the main package's manifest. Worth checking whether prepublishOnly is running at all in the release job, since napi prepublish is what injects that block — for example if publish uses --ignore-scripts, or if the main package is packed before the platform artifacts are collected.
Two smaller things visible in the same tarball, both consistent with the manifest not being regenerated at publish time:
0.1.2 ships build inputs (Cargo.toml, build.rs, src/, .yarnrc.yml, benchmark_results_nodejs.csv) — there's no files field to limit the tarball.
0.1.1 exists as a platform-package version but never as a main-package version, so the two are out of step.
Impact
0.1.x cannot be installed by any consumer on any platform. Anyone who already had 0.0.10 in a package-manager store keeps working after upgrading, which is likely why this has gone unreported for ~7 months — the failure only appears on a cold install.
We hit it while making this client an opt-in dependency of the Vercel AI SDK's Baseten provider (vercel/ai#18317) and have pinned our example to 0.0.10.
Suggested fix
Republish (e.g. 0.1.3) with the optionalDependencies block regenerated, and consider a post-publish smoke test that installs the tarball into an empty directory and require()s it — that would have caught all four releases.
Happy to verify a release candidate.
Summary
Every
@basetenlabs/performance-clientrelease after0.0.10is published without its platformoptionalDependencies, sorequire()fails withCannot find native bindingon every platform. The platform packages are built and present on npm — nothing declares a dependency on them, so no package manager installs them.0.0.10(2025-08-07) is the last usable release. The currentlatest,0.1.2, has been broken since 2026-01-28.Reproduction
Reproduced on macOS arm64 with npm 11.6.2 and pnpm 10.33.4. Note that
npm ireportsadded 1 package— no platform package is considered at all.The error text blames the npm optional-dependency bug, but that isn't the cause here: there is no optional dependency for a package manager to skip.
Cause
optionalDependenciesis absent from the published manifest:Across every release since
0.0.10:optionalDependencies0.0.100.0.18-rc00.1.00.1.1-rc00.1.2The binaries themselves publish fine —
@basetenlabs/performance-client-darwin-arm64@0.1.2exists and works once fetched:So
napi prepublish -t npmis uploading the platform artifacts but not writing them back into the main package's manifest. Worth checking whetherprepublishOnlyis running at all in the release job, sincenapi prepublishis what injects that block — for example if publish uses--ignore-scripts, or if the main package is packed before the platform artifacts are collected.Two smaller things visible in the same tarball, both consistent with the manifest not being regenerated at publish time:
0.1.2ships build inputs (Cargo.toml,build.rs,src/,.yarnrc.yml,benchmark_results_nodejs.csv) — there's nofilesfield to limit the tarball.0.1.1exists as a platform-package version but never as a main-package version, so the two are out of step.Impact
0.1.xcannot be installed by any consumer on any platform. Anyone who already had0.0.10in a package-manager store keeps working after upgrading, which is likely why this has gone unreported for ~7 months — the failure only appears on a cold install.We hit it while making this client an opt-in dependency of the Vercel AI SDK's Baseten provider (vercel/ai#18317) and have pinned our example to
0.0.10.Suggested fix
Republish (e.g.
0.1.3) with theoptionalDependenciesblock regenerated, and consider a post-publish smoke test that installs the tarball into an empty directory andrequire()s it — that would have caught all four releases.Happy to verify a release candidate.