Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#926 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
65/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
javascript, node.js

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Aucune donnée de langage
Étoiles
4k
Forks
350
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CommandCodeAI/command-code

Toutes les issues de CommandCodeAI/command-code

Issues similaires

Plus d'issues CLI

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.