fix: bump node-pty to ^1.2.0-beta.12 so the plugin works on Linux - #15
Open
AJV009 wants to merge 1 commit into
Open
fix: bump node-pty to ^1.2.0-beta.12 so the plugin works on Linux#15AJV009 wants to merge 1 commit into
AJV009 wants to merge 1 commit into
Conversation
node-pty 1.1.0 ships prebuilt binaries only for darwin-arm64, darwin-x64,
win32-arm64 and win32-x64 — there is no linux-x64 prebuild. Because semver
ranges exclude prereleases, "^1.1.0" can never resolve to the 1.2.0-beta
line that does ship Linux binaries.
The result on Linux is that the plugin installs and builds fine, but the
backend dies on startup:
Error: [web-terminal] Cannot find module 'node-pty'
Failed to start plugin server for web-terminal
which surfaces in the UI as a Terminal tab that mounts but never connects.
The underlying error is masked by the loader's generic re-throw; the real
one is:
Failed to load native module: pty.node, checked: build/Release,
build/Debug, prebuilds/linux-x64: Cannot find module
'./prebuilds/linux-x64//pty.node'
CloudCLI itself already depends on "^1.2.0-beta.12" for exactly this
reason, so this change aligns the plugin with its host.
Verified on Linux x64 / Node 22.18.0: a clean `npm install` resolves
node-pty 1.2.0-beta.15, ships prebuilds/linux-x64/pty.node, requires
without a source build, and `npm run build` succeeds. macOS and Windows
are unaffected — the beta line ships their prebuilds too.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011WfoF1z5anUFtH61ECn1ZF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Linux the Terminal tab mounts but never connects. The plugin backend exits immediately with:
The message is misleading —
node-ptyis installed. The loader's generic re-throw masks the real error:Cause
node-pty@1.1.0ships prebuilds fordarwin-arm64,darwin-x64,win32-arm64andwin32-x64only — there is nolinux-x64prebuild, and nobuild/output either, so there is nothing to load.Only the
1.2.0-betaline ships Linux binaries. Since semver ranges exclude prereleases,^1.1.0can never resolve to it, so no amount of reinstalling fixes this on Linux.Fix
Bump to
^1.2.0-beta.12— the same range CloudCLI itself already uses, so this aligns the plugin with its host rather than introducing a new constraint.Verification
Linux x64, Node 22.18.0, clean
rm -rf node_modules && npm install:node-pty@1.2.0-beta.15prebuilds/linux-x64/pty.nodepresentrequire('node-pty')succeeds with no source build (also verified with--ignore-scripts)npm run buildsucceedsmacOS and Windows are unaffected — the beta line ships their prebuilds too.
🤖 Generated with Claude Code
https://claude.ai/code/session_011WfoF1z5anUFtH61ECn1ZF