Repository navigation
Hoisted installs omit transitive .bin links, breaking bcrypt's install script #1543
Replies: 1 comment
|
Thanks — the diagnosis was exactly right, and the pointers to both call sites saved a lot of time. Fix is up in #1548. Your reproduction turned out to have an offline equivalent in the repo: the On the cause: the isolated layout solves transitive bins with a per-dep Running your reproduction unchanged against the patched binary: The native-module check passes, and AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: 2.1.270. |
Uh oh!
There was an error while loading. Please reload this page.
With
--node-linker=hoisted, Aube installs@mapbox/node-pre-gypbut does not create a reachablenode-pre-gypexecutable link. As a result,bcrypt@5.1.1fails during installation. The same manifest and npm lockfile pass with npm and with Aube's isolated linker.Environment
2.2.17 macos-arm64 (2026-09-15)24.15.0, npm11.12.0Reproduction
Run with the versions above. No workspace or private registry is needed.
Actual output:
The failed install contains
node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp(@mapbox/node-pre-gyp@1.0.11), but neither of these exists:Expected behavior
A dependency's install script should be able to invoke executables from its declared dependencies.
bcryptshould install successfully with the hoisted linker.Using a third fresh directory with the same manifest and lockfile, Aube's
--node-linker=isolated --no-side-effects-cacheinstall succeeds. Both npm and isolated Aube also pass this native-module check:node -e 'const b = require("bcrypt"); if (!b.compareSync("probe", b.hashSync("probe", 4))) process.exit(1)'Likely cause
In the 2.2.17 bin-linking implementation, the root pass links direct dependencies. The per-dependency pass returns early for hoisted layouts.
PR #122 fixed this class of failure for isolated installs and explicitly excluded hoisted transitive bins. This reproduction demonstrates the remaining gap using a single direct dependency. Hoisted installs need the appropriate executable links available before dependency lifecycle scripts run.
All reactions