From 3aae7ab75fab90cad087712d724de21f30136258 Mon Sep 17 00:00:00 2001 From: eYdr1en <54525514+eYdr1en@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:31:51 +0100 Subject: [PATCH] fix: rebuild node-pty from source for Node.js 22+ compatibility The prebuilt node-pty binaries don't support Node.js 22's ABI version (127), causing `posix_spawnp failed` errors when spawning PTY sessions. This fix adds a `npm rebuild node-pty --build-from-source` step after npm install to ensure the native module is compiled for the user's specific Node.js version. Fixes PTY spawn failures on systems running Node.js 22+. --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 15f8cbf..7a37156 100755 --- a/install.sh +++ b/install.sh @@ -813,6 +813,11 @@ main() { info "Installing dependencies..." npm install --quiet --no-fund --no-audit 2>/dev/null || npm install --no-fund --no-audit + # Rebuild node-pty from source for Node.js 22+ compatibility + # The prebuilt binaries may not support newer Node.js ABI versions + info "Rebuilding node-pty for current Node.js version..." + npm rebuild node-pty --build-from-source --quiet 2>/dev/null || npm rebuild node-pty --build-from-source + info "Building..." npm run build --quiet 2>/dev/null || npm run build