MiniMax-AI / MiniMax-AI/minimax-code

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

Open Beginner friendly
#128 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug cli needs-triage
Dominant language
TypeScript
Stars
1.3k
Forks
141
Avg merge
2h 45m
Merged PRs (30d)
46

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the package manifest's optionalDependencies and verify-native-install.mjs, the postinstall smoke test that runs SELECT 1 AS value. Reproduce the global install warning, then verify that the chosen dependency change or removal eliminates the deprecation warning while the smoke test still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.