Skip to content

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
cloudcli-ai:mainfrom
AJV009:fix/node-pty-linux-prebuilds
Open

fix: bump node-pty to ^1.2.0-beta.12 so the plugin works on Linux#15
AJV009 wants to merge 1 commit into
cloudcli-ai:mainfrom
AJV009:fix/node-pty-linux-prebuilds

Conversation

@AJV009

@AJV009 AJV009 commented Aug 27, 2026

Copy link
Copy Markdown

Problem

On Linux the Terminal tab mounts but never connects. The plugin backend exits immediately with:

Error: [web-terminal] Cannot find module 'node-pty' - run npm install in .../dist
Failed to start plugin server for web-terminal

The message is misleading — node-pty is installed. The loader's generic re-throw masks the real error:

Failed to load native module: pty.node, checked: build/Release, build/Debug,
prebuilds/linux-x64: Cannot find module './prebuilds/linux-x64//pty.node'

Cause

node-pty@1.1.0 ships prebuilds for darwin-arm64, darwin-x64, win32-arm64 and win32-x64 only — there is no linux-x64 prebuild, and no build/ output either, so there is nothing to load.

Only the 1.2.0-beta line ships Linux binaries. Since semver ranges exclude prereleases, ^1.1.0 can 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:

  • resolves node-pty@1.2.0-beta.15
  • prebuilds/linux-x64/pty.node present
  • require('node-pty') succeeds with no source build (also verified with --ignore-scripts)
  • npm run build succeeds
  • Terminal tab connects; plugin server starts and the WS proxy attaches

macOS and Windows are unaffected — the beta line ships their prebuilds too.

🤖 Generated with Claude Code

https://claude.ai/code/session_011WfoF1z5anUFtH61ECn1ZF

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
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