[Bug]: ACP launcher bootstrap fails with ETARGET after each release (npm --prefer-offline reads stale metadata)

未关闭 适合新手
#639 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
cli, devtools

调研方向

从 acp.js 中 bootstrap 的 npmArgs 列表开始,然后检查 bootstrap 安装失败是如何报告的。使用 --prefer-offline 重现元数据过期的情况,并检查 npm 如何报告 ETARGET 或 notarget。完成标准是:发生该错误时,bootstrap 使用 --prefer-online 重试一次,并且仍按正常方式报告其他安装错误。

由索引模型根据 Issue 内容生成。

描述

Product or interface

CLI - ACP

Version

@minimax-ai/code-acp 0.8.1, bootstrapping @minimax-ai/code 0.8.1. The same failure happened earlier with 0.8.0. npm 11.19.0, Node.js 24.22.1.

Platform

Linux

OS version and architecture

Ubuntu 24.04 x64

Issue area

Startup / install / update

Steps to reproduce
  1. Use a host whose npm cache holds metadata for @minimax-ai/code that was fetched before the new release was published.
  2. Have an ACP client update the launcher to the new @minimax-ai/code-acp version and open a session. At this point there is no ready.json yet for the new release under ~/.minimax-code/acp-releases/.
  3. The launcher bootstraps with npm install @minimax-ai/code@<version> --prefer-offline … (acp.js, the npmArgs list in the bootstrap).
Expected and actual behavior

Expected: the launcher installs the exact version it targets.

Actual: with --prefer-offline, npm answers from the cached metadata, which does not list the new version yet. The install fails with ETARGET. Every session open then fails until the cached metadata expires or something else refreshes it, and the ACP client only sees a generic session-open failure. On one host this happened after the 0.8.0 release and again after 0.8.1. The second time it lasted about 17.5 hours and affected 28 session attempts. Running npm view @minimax-ai/code@<version> version --prefer-online once clears it immediately.

The launcher's isolated npm environment drops every npm_config_* variable except the proxy keys, so a client cannot pass prefer-online itself.

Suggested fix: when the bootstrap install fails with ETARGET/notarget, retry it once with --prefer-online. The launcher always targets an exact, often just-published version, so stale metadata is expected right after each release.

Redacted error summary
MiniMax Code bootstrap failed: npm install @minimax-ai/[email protected] exited with code 1: npm error code ETARGET
npm error notarget No matching version found for @minimax-ai/[email protected].
npm error notarget In most cases you or one of your dependencies are requesting a package version that doesn't exist.
Before submitting
  • I have searched existing issues.
  • I have included my version and removed sensitive information.
主要语言
TypeScript
星标
2.3k
派生
315
平均合并
3 小时 54 分钟
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MiniMax-AI/minimax-code 的其他 Issue

查看 MiniMax-AI/minimax-code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。