Skip to content

npm 12: global install blocks better-sqlite3 and postinstall scripts, leaving tt broken on first run #71

Description

@mostlydev

Problem

npm 12 no longer runs dependency install scripts by default. Codex verified this in a fresh global prefix during the 0.15.0 release:

  • npm install -g talking-stick (0.15.0 tarball) exits 0, but blocks the install scripts of both talking-stick (postinstall: skiller bootstrap / skill sync) and better-sqlite3 (native binding build).
  • The first tt command that touches room state fails with better-sqlite3's "Could not locate the bindings file".

This isn't a 0.15.0 regression: 0.14.x has the same dependency and would behave the same on npm 12. Approving the scripts, or rebuilding better-sqlite3, fixes the install.

Suggested fixes

  1. Docs, now: document the npm 12 install step in README Quickstart, i.e. whatever allow-scripts approval npm 12 expects for talking-stick and better-sqlite3, or a follow-up npm rebuild -g better-sqlite3.
  2. Clear runtime error: catch the missing-binding error when opening the DB and print an actionable message with the exact command, instead of the raw bindings stack.
  3. Longer term: evaluate node:sqlite (built into Node ≥22.5) to drop the native dependency entirely, which would also make installs script-free. The postinstall skill sync already has a fallback on the first human CLI run.

Environment

npm 12.0.2, Node 22/24, macOS. Found during the 0.15.0 release (PR #70).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions