Skip to content

fix: resolve spawn EINVAL on Windows for beacon deploy - #78

Merged
DIodide merged 1 commit into
stagingfrom
fix/deploy-beacon-einval
Mar 23, 2026
Merged

DIodide merged 1 commit into
stagingfrom
fix/deploy-beacon-einval

Conversation

@DIodide

@DIodide DIodide commented Mar 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes spawn EINVAL error when running npm run deploy:beacon on Windows
  • On Windows, npm is a .cmd batch file — child_process.spawn can't execute it without shell: true, causing an EINVAL error
  • Enables shell: true only on Windows (process.platform === 'win32') to avoid Node deprecation warnings on other platforms
  • Removes unused getNpmCommand() helper that tried to work around this by using npm.cmd (insufficient — the shell is still needed)

Test plan

  • npm run deploy:beacon:dry-run passes on macOS with no warnings
  • Teammate confirms npm run deploy:beacon works on Windows

🤖 Generated with Claude Code

On Windows, npm is a .cmd batch file that requires a shell to execute.
Without shell:true, child_process.spawn fails with EINVAL. Enable shell
mode on Windows only to avoid deprecation warnings on other platforms,
and remove the now-unnecessary getNpmCommand helper.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DIodide
DIodide merged commit 4b34d3b into staging Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant