Skip to content

[Bug]: npm install -g @minimax-ai/code prints deprecation warning for prebuild-install@7.1.3 (transitive via better-sqlite3@12.11.1) #128

Description

@Ace-Kelly

What happened

Running npm install -g @minimax-ai/code (or npm update -g) prints a deprecation warning for a transitive dependency. The warning is noise today, but prebuild-install is officially unmaintained, so future Node or prebuild-mirror changes could turn this into a real install failure.

npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.

Where it comes from

The deprecated package is pulled in transitively via better-sqlite3, which @minimax-ai/code lists as an optionalDependency:

@minimax-ai/code@0.1.6
  └─ optionalDependencies
     └─ better-sqlite3@12.11.1
        └─ prebuild-install@7.1.3   ← deprecated, unmaintained

better-sqlite3 is only used by verify-native-install.mjs (the postinstall smoke test that runs SELECT 1 AS value). The main cli.js and matrix-mcp-stdio.js do not require("better-sqlite3").

Environment

  • MCode CLI: 0.1.6 (npm @minimax-ai/code)
  • npm: 11.10.0
  • Node.js: 22.22.0 (within the supported range >=22.19 <23 || >=24 <27)
  • OS: Windows 11 家庭中文版 (build 26200)
  • Install command: npm install -g @minimax-ai/code

Steps to reproduce

  1. Uninstall any prior copy: npm uninstall -g @minimax-ai/code
  2. npm install -g @minimax-ai/code
  3. Read the npm output

Expected behavior

No deprecation warnings. better-sqlite3 is only used for a one-line postinstall smoke test, so carrying an unmaintained transitive dep is not worth the cost.

Suggested fix

Either of these would clear the warning with no behavior change:

  1. Bump optionalDependencies.better-sqlite3 to ^13.0.0. better-sqlite3@13.x drops prebuild-install entirely (only node-addon-api remains), ships prebuilds via the package exports field, and requires Node ≥ 22, which already matches MCode's supported Node range.

  2. Drop better-sqlite3 from optionalDependencies (and verify-native-install.mjs) if the runtime doesn't actually need it. I checked the installed bundle — the only consumer of better-sqlite3 is the postinstall smoke test.

I tested option 1 locally on Windows 11: the smoke test still passes with better-sqlite3@13.0.3 (SELECT 1 AS value returns { value: 1 }), and npm install no longer prints any deprecation warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions