Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Windows: OpenAI BYOK login reports npm install failed (exit 1), but npm exits 0 — Command Code 1.65.0

Abierto
#926 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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
  1. Use Windows 11 with Command Code 1.65.0, Node.js 22.19.0, and npm 11.13.0.
  2. Start Command Code in a directory that already has a package.json and node_modules.
  3. Run /connect and select OpenAI ChatGPT/Codex.
  4. Attempt to sign in.
  5. 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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CommandCodeAI/command-code

Todos los issues de CommandCodeAI/command-code

Issues similares

Más issues de CLI

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.