You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: add prebuilt binaries for node-pty to fix npx installation #29
Running shellwright via npx -y @dwmkerr/shellwright fails with:
Error: posix_spawnp failed.
This happens because node-pty is a native module that requires compilation. When npx installs to its cache directory, the compilation can fail silently, leaving broken binaries.
Current Workaround
Install globally instead of using npx:
npm install -g @dwmkerr/shellwright
claude mcp add --scope user shellwright -- shellwright
Proposed Solution
Add prebuilt binaries so native compilation isn't required at install time.
Options
prebuild + prebuild-install
Build binaries in CI for each platform/Node version
Users download prebuilt binary at install time
Fallback to compilation if no matching binary
node-pre-gyp
Similar approach, hosts binaries on S3/GitHub releases
More established but more complex setup
Optional dependencies
Use @aspect-build/node-pty-prebuilt-multiarch or similar
The issue is not missing prebuilt binaries - it's a bug in node-pty 1.1.0.
The Bug
node-pty 1.1.0 ships prebuilt binaries with incorrect file permissions:
spawn-helper is packaged as 644 (not executable)
Should be 755 (executable)
When npm/npx extracts the tarball, spawn-helper can't execute, causing posix_spawnp failed.
Why Local Dev Works
shellwright's package.json uses ^1.0.0, and the local lockfile resolved to 1.0.0. This version compiles from source via node-gyp, which sets correct permissions.
When installed via npx (no lockfile), npm resolves ^1.0.0 to latest compatible = 1.1.0, hitting the bug.
Activity
dwmkerr commentedon Jan 4, 2026
Root Cause Identified
The issue is not missing prebuilt binaries - it's a bug in node-pty 1.1.0.
The Bug
node-pty 1.1.0 ships prebuilt binaries with incorrect file permissions:
spawn-helperis packaged as644(not executable)755(executable)When npm/npx extracts the tarball,
spawn-helpercan't execute, causingposix_spawnp failed.Why Local Dev Works
shellwright's package.json uses
^1.0.0, and the local lockfile resolved to1.0.0. This version compiles from source via node-gyp, which sets correct permissions.When installed via npx (no lockfile), npm resolves
^1.0.0to latest compatible =1.1.0, hitting the bug.Upstream Issue
microsoft/node-pty#850
Fix
Pin to
node-pty: "1.0.0"(exact version) until node-pty releases a fix (likely 1.2.0).This means users need build tools (Xcode CLI / build-essential), but it works reliably.
Keeping this issue open to track upgrading to node-pty 1.2.x when released.