Windows: OpenAI BYOK login reports npm install failed (exit 1), but npm exits 0 — Command Code 1.65.0
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 65/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
- Área
- cli, developer-experience, tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 4k
- Forks
- 350
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CommandCodeAI/command-code
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CommandCodeAI/command-code#903 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CommandCodeAI/command-code#855 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CommandCodeAI/command-code#841 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CommandCodeAI/command-code#655 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CommandCodeAI/command-code#608 ·
Todos los issues de CommandCodeAI/command-code
Issues similares
-
`--app` focus through the daemon can pick an off-screen window and refuse with `axElementNotFound` Abiertoclawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
state:needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
zed-industries/zed#64742 · 1 comentario ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 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) Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
eandualem/avatar-studio#68 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100