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
- Uninstall any prior copy:
npm uninstall -g @minimax-ai/code
npm install -g @minimax-ai/code
- 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:
-
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.
-
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.
What happened
Running
npm install -g @minimax-ai/code(ornpm update -g) prints a deprecation warning for a transitive dependency. The warning is noise today, butprebuild-installis officially unmaintained, so future Node or prebuild-mirror changes could turn this into a real install failure.Where it comes from
The deprecated package is pulled in transitively via
better-sqlite3, which@minimax-ai/codelists as anoptionalDependency:better-sqlite3is only used byverify-native-install.mjs(the postinstall smoke test that runsSELECT 1 AS value). The maincli.jsandmatrix-mcp-stdio.jsdo notrequire("better-sqlite3").Environment
@minimax-ai/code)>=22.19 <23 || >=24 <27)npm install -g @minimax-ai/codeSteps to reproduce
npm uninstall -g @minimax-ai/codenpm install -g @minimax-ai/codeExpected behavior
No deprecation warnings.
better-sqlite3is 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:
Bump
optionalDependencies.better-sqlite3to^13.0.0.better-sqlite3@13.xdropsprebuild-installentirely (onlynode-addon-apiremains), ships prebuilds via the packageexportsfield, and requires Node ≥ 22, which already matches MCode's supported Node range.Drop
better-sqlite3fromoptionalDependencies(andverify-native-install.mjs) if the runtime doesn't actually need it. I checked the installed bundle — the only consumer ofbetter-sqlite3is 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 valuereturns{ value: 1 }), andnpm installno longer prints any deprecation warning.