From 45fa2e285c2ee4092dba25bd9d3d18b28bd741f6 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Thu, 16 Apr 2026 13:36:07 -0700 Subject: [PATCH] fix(setup): verify @ngrok/ngrok can load on Windows Mirror the existing Playwright verification step. Since @ngrok/ngrok is now externalized in server-node.mjs (resolved at runtime from node_modules), confirm the platform-specific native binary (@ngrok/ngrok-win32-x64-msvc et al.) is installed at setup time rather than surfacing the failure later when the user runs /pair-agent. Same fallback pattern: if `node -e "require('@ngrok/ngrok')"` fails, fall back to `npm install --no-save @ngrok/ngrok` to pull the missing binary. Co-Authored-By: Claude Opus 4.7 (1M context) --- setup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup b/setup index b00608b8..5b974e23 100755 --- a/setup +++ b/setup @@ -292,6 +292,10 @@ if ! ensure_playwright_browser; then cd "$SOURCE_GSTACK_DIR" # Bun's node_modules already has playwright; verify Node can require it node -e "require('playwright')" 2>/dev/null || npm install --no-save playwright + # @ngrok/ngrok is externalized in server-node.mjs and resolved at runtime. + # Verify the platform-specific native binary is installed so /pair-agent + # tunnels don't fail later with a cryptic module-not-found error. + node -e "require('@ngrok/ngrok')" 2>/dev/null || npm install --no-save @ngrok/ngrok ) fi fi