Skip to content

bun install -g requires manual bun pm trust better-sqlite3 #198

@ramonclaudio

Description

@ramonclaudio

bun install -g @tobilu/qmd prints "Blocked 1 postinstall" and then crashes:

Error: Could not locate the bindings file.

bun blocks better-sqlite3's postinstall (node-gyp compile) by default. the .node binary never gets built. fix is bun pm trust better-sqlite3 -g but nothing in the error points you there.

npm registry installs work fine since npm runs postinstall by default.

install method works?
npm registry
bun registry ❌ needs bun pm trust better-sqlite3
npm git ❌ fixed by #197
bun git ❌ fixed by #197

one fix is adding "trustedDependencies": ["better-sqlite3"] to package.json so bun auto-runs the postinstall. another option is having the wrapper prefer bun when available (bun:sqlite, no native addon needed) but that's blocked by #161.

related: #197, #161, #182

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