Skip to content

CLI exits 0 with no output when node-pty fails to build (missing C toolchain); breaks desktop SSH launch with empty server.log #5129

Description

@TorbenWetter

Environment: Ubuntu 26.04 LTS minimal server (Hetzner), Node 24.18.1 via mise, npm 11.x. Reproduced with t3@0.0.31 and t3@0.1.0-alpha.1.

Repro: On a machine without a C toolchain (no build-essential):

$ npx -y t3@0.0.31 --version
$ echo $?
0

Prints nothing, exits 0. Same for --help, connect, serve.

Root cause: node-pty fails its node-gyp build (no gcc/make). npm swallows the failure — the npx cache dir ends up essentially empty, node_modules/.bin/t3 never materializes, and npx still exits 0 having run nothing. A plain npm install t3 in an empty dir shows the real gyp ERR! output.

Knock-on effect: the desktop app's SSH-launch flow fails with SshCommandError: Remote T3 server did not become ready on 127.0.0.1:3773 and a 0-byte ~/.t3/ssh-launch/<key>/server.log — nothing points at the actual cause. Installing build-essential fixes everything instantly.

Suggestions:

  • preflight check with a clear "install a C toolchain" message
  • surface the npm install stderr in the ssh-launch server.log
  • or ship prebuilds for node-pty on common platforms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions