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
[Bug]: Native SQLite binding missing when installed via pnpm/mise (aube) — lifecycle scripts blocked, and the error only suggests an npm fix #641
aube, like pnpm 10+, does not run dependency lifecycle scripts unless the package is allowlisted (allowBuilds / onlyBuiltDependencies). So better-sqlite3's install script (prebuild-install || node-gyp rebuild) never runs and build/Release/better_sqlite3.node is never created. mcode's own postinstall (verify-native-install.mjs) is skipped too, so nothing catches this at install time.
Expected and actual behavior
Actual: mcode fails at startup with:
MCode could not load its native SQLite dependency.
If npm reported blocked install scripts, the installation needs explicit script approval.
Reinstall with the original installer. For npm installations, run:
npm install --global @minimax-ai/code@0.8.1 --ignore-scripts=false --include=optional --allow-scripts=@minimax-ai/code,better-sqlite3 --registry https://registry.npmjs.org/ --foreground-scripts
The suggested fix only covers npm. For mise/pnpm/aube users, running it creates a second, global npm copy instead of fixing the installed one.
Workaround that works: allowlist the build in mise and reinstall:
[tools."npm:@minimax-ai/code"]
version = "latest"allow_builds = ["better-sqlite3"]
mise install -f npm:@minimax-ai/code. After that, the binding is fetched by prebuild-install and mcode starts normally. (pnpm users would use pnpm approve-builds -g / onlyBuiltDependencies.)
Suggestions
Error message / docs: detect or at least mention non-npm installers (pnpm, mise/aube, bun) and show the matching allowlist command. Add these to the installation docs.
Longer term: consider removing the install-script dependency entirely. One option is shipping the binding as per-platform optionalDependencies packages (the esbuild/swc pattern), which needs no lifecycle scripts. Another is node:sqlite, since the supported Node range (22.19+, 24–26) already has it. Either option would also avoid the problem that verify-native-install.mjs is skipped under the same policies.
Related: #173 (updater assumes npm when npm is managed by pnpm).
Activity