You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npm 12 blocks bb-app's native-module install scripts by default: every install path (npm -g, npx, install.sh, self-update) yields a bb that cannot load better-sqlite3 / node-pty #1120
Fresh install of the server on a Linux box and, separately, via the "Add machine" one-line installer on macOS — both using a clean Node 24 LTS install (npm 11.17.0, which ships with Node 24). No custom .npmrc existed on either machine.
What happened
npm install/npx bb-app@latest completed "successfully" but silently skipped the install/postinstall scripts for four packages that need native compilation:
npm 11 ships a default allow-scripts allowlist (empty by default: allow-scripts = [""]) that silently no-ops install scripts for packages not on the list, rather than failing the install. Since better-sqlite3 (the database driver) and the others never get their native bindings built/downloaded, this is the exact failure mode already documented in the README's troubleshooting section ("Could not locate the bindings file") — just from a newer root cause (npm's own new default) than the ignore-scripts=true cause that section currently documents.
Separately, on macOS the "Add machine" one-line installer failed a second way after this: npm installed bb-app, but its global bin directory is not on PATH (the installed bb/bb-app/bb-host-daemon/bb-server binaries land in the active Node version's global bin dir, e.g. ~/.nvm/versions/node/v24.19.0/bin/, which isn't necessarily on PATH in the non-login/non-interactive shell context the installer script runs in).
Expected
The install path (both the plain npx bb-app@latest flow and the /install.sh machine-join installer) should either:
pass --foreground-scripts/set npm_config_allow-scripts for its own known-safe native deps before installing, so a default npm 11 install doesn't silently produce a broken bb, or
detect the skipped-scripts warning and fail loudly with a pointer to the fix, instead of reporting success.
This will affect essentially every fresh install on a machine with npm 11+ (i.e. Node 22.19+/24+/26+, which is also what bb-app's own engines field requires) since the version ranges directly overlap.
⚠ Agent-generated: An AI agent ran this reproduction and drafted this
reply. The npm debug logs quoted below are real output from that run. Please
verify details before you act on them.
Thanks for the detailed report, and for testing on two machines.
I tried to reproduce this and could not. I think the allow-scripts warning is a
red herring, but I also think you hit something real. I need a bit more from you
to find it.
What I tested
Clean temporary HOME, no .npmrc, on two Node versions:
Node 24.18.0 with npm 11.17.0
Node 26.5.0 with npm 11.17.0
I ran both npm install [email protected] and the npx bb-app@latest path.
better_sqlite3.node and pty.node were both built and present afterward. The
server started and loaded its plugins.
So on npm 11.17.0 the warning is advisory. It reports that those packages have no
review entry yet. It does not block them. An empty allow-scripts value creates
no policy, so npm permits the scripts and then warns.
What I need
Your install clearly broke, so something else is going on. Can you send:
The exact output of npm --version and node --version on the machine that
broke.
The exact install command you ran, including the npx or installer line for
the macOS case.
Verdict: PARTIALLY REPRODUCED · root-cause confidence: high
Root cause (short): bb-app's native add-ons (better-sqlite3, node-pty) are only built by npm install scripts; npm 11's allowScripts policy is advisory (scripts still run, so the reporter's npm 11.17 mechanism is refuted), but npm 12 (registry latest since 2026-07-08) blocks unreviewed dependency scripts by default and, for -g/npx installs, ignores the package's own allowScripts, so every bb install path (npm -g, npx, install.sh, daemon self-update) that passes no --allow-scripts yields a bb that crashes with "Could not locate the bindings file" / "Failed to load native module: pty.node"; the PATH sub-issue was already fixed by Fix machine installation reliability and feedback #1419.
Proposed fix: Add --allow-scripts=better-sqlite3,node-pty,@parcel/watcher to both npm install -g lines in apps/server/src/assets/install-machine.sh and to the self-updater argv in apps/host-daemon/src/protocol-self-update.ts (defaultInstallTarball); verified end to end (author and independent verifier) that this makes the npm 12.0.2 machine join succeed, that npm 11 accepts the flag and npm 10.9.9 ignores it (in -g --prefix flag and env-var forms). After npm install, verify require(better-sqlite3)/require(node-pty) load and fail the installer loudly with a pointer to --allow-scripts / ignore-scripts (…
Caveats: Revision addressed all verifier findings: the npm 11.17.0 control was re-run on a fresh port (39901) with the fixed 1120-install-matrix.sh (busy-port refusal, setsid + process-group kill, still-listening check) and npm11.17.out plus the HTML paste were replaced with a clean run (bb-server exit 143, port released, HTTP 200 from that install's own server); package.json permalink corrected to L68-L77…
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at 16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
Retitled to match what reproduced (https://get-bb.github.io/reports/issues/1120.html). On npm 11.16/11.17 the allowScripts policy is advisory — the install scripts still run and bb starts, so the original mechanism does not hold. On npm 12.0.x (registry latest since 2026-07-08) unreviewed dependency scripts are blocked by default and, for -g/npx installs, the package's own allowScripts is ignored, so every bb install path produces "Could not locate the bindings file" / "Failed to load native module: pty.node". Fix verified end to end: pass --allow-scripts=better-sqlite3,node-pty,@parcel/watcher in install-machine.sh and the self-updater argv (npm 11 accepts it, npm 10 ignores it), and document the npx --allow-scripts=… form.
Activity
SawyerHood commentedon Aug 7, 2026
ty for the report. will make sure to fix this! maybe we can move off of better-sqlite to node:sqlite and remove the post install scripts entirely
SawyerHood commentedon Aug 8, 2026
Thanks for the detailed report, and for testing on two machines.
I tried to reproduce this and could not. I think the
allow-scriptswarning is ared herring, but I also think you hit something real. I need a bit more from you
to find it.
What I tested
Clean temporary
HOME, no.npmrc, on two Node versions:I ran both
npm install [email protected]and thenpx bb-app@latestpath.What I found
npm printed the same four warnings you saw:
But the npm debug log shows every one of those scripts ran and returned 0:
better_sqlite3.nodeandpty.nodewere both built and present afterward. Theserver started and loaded its plugins.
So on npm 11.17.0 the warning is advisory. It reports that those packages have no
review entry yet. It does not block them. An empty
allow-scriptsvalue createsno policy, so npm permits the scripts and then warns.
What I need
Your install clearly broke, so something else is going on. Can you send:
npm --versionandnode --versionon the machine thatbroke.
npxor installer line forthe macOS case.
node_modules/better-sqlite3/build/Release/better_sqlite3.nodenode_modules/node-pty/build/Release/pty.node_logs/in your npmcache directory. The
info run ...lines are the ones that matter.If your npm is a different patch than 11.17.0, that alone could explain the
difference. This policy is new and its behavior has been changing.
SawyerHood commentedon Aug 18, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1120.html
npm install -glines in apps/server/src/assets/install-machine.sh and to the self-updater argv in apps/host-daemon/src/protocol-self-update.ts (defaultInstallTarball); verified end to end (author and independent verifier) that this makes the npm 12.0.2 machine join succeed, that npm 11 accepts the flag and npm 10.9.9 ignores it (in -g --prefix flag and env-var forms). After npm install, verifyrequire(better-sqlite3)/require(node-pty)load and fail the installer loudly with a pointer to --allow-scripts / ignore-scripts (…The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at
16ceb3a54, and repro artifacts. It was independently re-run by a second agent (see its Verification section).[-]Fresh install silently breaks native modules under npm 11's default allow-scripts policy[/-][+]npm 12 blocks bb-app's native-module install scripts by default: every install path (npm -g, npx, install.sh, self-update) yields a bb that cannot load better-sqlite3 / node-pty[/+]SawyerHood commentedon Aug 18, 2026
Retitled to match what reproduced (https://get-bb.github.io/reports/issues/1120.html). On npm 11.16/11.17 the allowScripts policy is advisory — the install scripts still run and bb starts, so the original mechanism does not hold. On npm 12.0.x (registry
latestsince 2026-07-08) unreviewed dependency scripts are blocked by default and, for -g/npx installs, the package's ownallowScriptsis ignored, so every bb install path produces "Could not locate the bindings file" / "Failed to load native module: pty.node". Fix verified end to end: pass--allow-scripts=better-sqlite3,node-pty,@parcel/watcherininstall-machine.shand the self-updater argv (npm 11 accepts it, npm 10 ignores it), and document thenpx --allow-scripts=…form.Allow native add-on install scripts under npm 12's allowScripts policy (