Windows: OpenAI BYOK login reports npm install failed (exit 1), but npm exits 0 — Command Code 1.65.0
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, node.js
调研方向
Look for the Windows subprocess wrapper handling npm install for BYOK providers. The fix prompt mentions running the install in a dedicated provider/cache directory with an explicit cwd. Start by finding where provider installation is triggered in /connect, then examine the process spawning logic. Check how exit codes, stdout, and stderr are captured. Verify the fix by testing on Windows with an existing project's node_modules to ensure no unintended pruning occurs.
由索引模型根据 Issue 内容生成。
描述
Summary
On Windows, selecting OpenAI ChatGPT/Codex in /connect makes provider installation fail, so the ChatGPT OAuth login cannot start. Command Code reports exit 1, but npm debug logs show that the install actually completed with exit 0.
Expected Behavior
The on-demand provider install should run in an isolated provider directory rather than inheriting the user project working directory, should report failure only when npm actually returns a non-zero status, and should continue to the OpenAI OAuth flow after a successful install. It must not prune or otherwise alter unrelated dependencies in the user project node_modules.
Actual Behavior
The UI aborts with: npm install @byokkit/cmd-provider-openai@0.1.2 failed (exit 1): Das System kann den angegebenen Pfad nicht gefunden. However, the corresponding npm debug log ends with: verbose exit 0 / info ok. All registry requests return HTTP 200, the package and dependencies are extracted, and package.json plus dist/index.js exist at the attempted install target. Repeated attempts installed the package in in the active repository. The latter install caused npm to retire/remove unrelated packages from the repository node_modules. Login remains blocked because Command Code interprets the subprocess result as exit 1.
Steps to reproduce the issue
- Use Windows 11 with Command Code 1.65.0, Node.js 22.19.0, and npm 11.13.0.
- Start Command Code in a directory that already has a package.json and node_modules.
- Run /connect and select OpenAI ChatGPT/Codex.
- Attempt to sign in.
- Compare the displayed error with the newest npm debug log in %LOCALAPPDATA%/npm-cache/_logs. The UI says exit 1, while npm ends with verbose exit 0 and info ok.
Command Code Version
1.65.0
Operating System
Windows
Terminal/IDE
WezTerm
Shell
cmd.exe
Session file (optional)
No response
Fix prompt (optional)
Inspect the Windows subprocess wrapper used for on-demand BYOK provider installation. Make the provider install run in a dedicated provider/cache directory with an explicit cwd instead of inheriting the active project directory. Capture and interpret the real process exit status, stdout, stderr, and spawn errors correctly; npm output ending in exit 0 must be treated as success. Only surface the Windows path error when a real spawn error or non-zero npm result occurred. After success, verify that @byokkit/cmd-provider-openai can be imported before starting OAuth. Add Windows regression tests for a project with existing unrelated node_modules, a successful npm exit 0, and a genuine missing command/path error. Verify that provider installation never prunes or rewrites project dependencies.
Additional context
Environment: Windows 11 build 26100; Command Code 1.65.0, current npm latest; Node.js v22.19.0; npm 11.13.0; WezTerm; cmd.exe. npm evidence: command npm install Abyokkit/cmd-provider-openai@0.1.2; registry requests returned HTTP 200; log contains silly ADD node_modules/@byokkit/cmd-provider-openai; log ends with verbose exit 0 and info ok. Installed files include dist/index.js and dist/codex.js. An isolated reproduction using npm install --prefix with a scratch directory also succeeded and added 9 packages. No API keys, OAuth tokens, auth.json contents, or session transcript are included.
- 主要语言
- 没有语言数据
- 星标
- 4k
- 派生
- 350
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CommandCodeAI/command-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#903 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#855 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
CommandCodeAI/command-code#841 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#655 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
CommandCodeAI/command-code#608 ·
查看 CommandCodeAI/command-code 的全部 Issue
相似的 Issue
-
`--app` focus through the daemon can pick an off-screen window and refuse with `axElementNotFound` 未关闭clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P1
难度 2/5 1-3 小时 新手友好度 88/100
-
state:needs triage
难度 2/5 1-3 小时 新手友好度 75/100
zed-industries/zed#64742 · 1 条评论 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 78/100
gitbutlerapp/gitbutler#16066 ·
-
make dev prints the runtime default model (gpt-5.6-terra), not the app's text model (gpt-5.6-sol) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eandualem/avatar-studio#68 ·
-
难度 2/5 1-3 小时 新手友好度 75/100