Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

pnpm run build fails on Windows with spawnSync npm ENOENT

Đang mở Phù hợp với người mới
#190 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nodejs, shell, typescript
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Vấn đề nằm trong scripts/build-coding-agent-bundle.mjs nơi execFileSync gọi npm. Trên Windows, tệp thực thi là npm.cmd. Kiểm tra cách các tập lệnh khác trong dự án gọi npm trên Windows, có thể sử dụng cmd.exe /c hoặc shell. Xem xét lệnh gọi execFileSync và sửa đổi nó để sử dụng đường dẫn tệp thực thi chính xác hoặc shell. Chạy pnpm run build trên máy Windows hoặc môi trường CI Windows để xác minh bản sửa lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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/[email protected] 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.

Ngôn ngữ chính
TypeScript
Star
54
Fork
20
Merge trung bình
4 giờ 1 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stepfun-ai/Step-Code

Tất cả issue của stepfun-ai/Step-Code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.