Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

pnpm run build fails on Windows with spawnSync npm ENOENT

オープン 初心者向け
#190 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nodejs, shell, typescript
領域
build-system, cli

調査の方向性

問題は scripts/build-coding-agent-bundle.mjs にあり、execFileSync が npm を呼び出しています。Windowsでは、実行可能ファイルは npm.cmd です。プロジェクト内の他のスクリプトがWindowsでnpmをどのように呼び出しているかを確認してください。おそらく cmd.exe /c またはシェルを使用しています。execFileSync の呼び出しを調べ、正しい実行可能ファイルのパスまたはシェルを使用するように修正してください。修正を確認するために、WindowsマシンまたはWindows CI環境で pnpm run build を実行してください。

索引モデルが issue の本文から書いたものです。

説明

What happened?

pnpm run build fails on Windows while bundling @step-harness/coding-agent. TypeScript compilation and copy-assets finish, then scripts/build-coding-agent-bundle.mjs exits with spawnSync npm ENOENT.

Environment: Windows 10 (10.0.26200), Node.js v24.14.1, pnpm 9.15.9, package @step-harness/coding-agent@0.84.4 at commit 8297eb5.

node:internal/child_process:1119
    result.error = new ErrnoException(result.error, 'spawnSync ' + options.file);
                   ^

Error: spawnSync npm ENOENT
  code: 'ENOENT',
  syscall: 'spawnSync npm',
  path: 'npm',
  spawnargs: [
    '--prefix',
    'D:\\code\\git-project\\Step-Code\\apps\\cli',
    'run',
    'build'
  ]
}

The stack points at execFileSync("npm", ["--prefix", appEntryDir, "run", "build"], ...) in scripts/build-coding-agent-bundle.mjs.

Earlier npm run build steps in the same pnpm run build succeed, because pnpm launches them through cmd.exe /c. execFileSync does not use a shell and does not search PATHEXT, so it looks for a file named npm. On Windows the executable is npm.cmd.

Steps to reproduce

  1. Clone the repo on Windows and run pnpm install --ignore-scripts.
  2. Run pnpm run build from the repository root.

Expected behavior

pnpm run build completes, including the CLI compile started by the coding-agent bundle script.

主要言語
TypeScript
スター
54
フォーク
20
平均マージ
4時間 1分
マージ済み PR(30日)
12

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stepfun-ai/Step-Code のほかの issue

stepfun-ai/Step-Code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。