Skip to content

Remote server update fails on Linux when node-pty must compile (no linux-x64 prebuild; opaque error) #6012

Description

@MayberryDT

Summary

Remote/boot-service self-update can fail on Linux while preparing a pinned t3@<version> runtime because node-pty has no linux-x64 prebuild and the native rebuild fails. The desktop/UI only shows:

Server update failed: Could not prepare t3@0.0.33.

The underlying npm/node-gyp error is not surfaced, so operators have to dig through server npm debug logs and effect traces.

Environment

  • Host: Ubuntu 24.04 (Linux x64)
  • T3 server mode: boot-service / headless (t3 service, T3CODE_HOME pinned runtimes under runtime/versions/)
  • From version: 0.0.32
  • Target version: 0.0.33
  • Node: v22.23.1
  • System compiler: g++ → g++-13 (no g++-11 package installed)

What happens

  1. Client requests remote update to exact version 0.0.33.
  2. Server runs ensurePinnedRuntimeInstallednpm install --prefix <staging> --no-fund --no-audit t3@0.0.33.
  3. Install pulls node-pty@1.1.0.
  4. node-pty install script: node scripts/prebuild.js || node-gyp rebuild.
  5. Prebuild check: no prebuilds/linux-x64 in the published package (only darwin/win32 prebuilds present).
  6. Rebuild fails. In our case the make step looked for g++-11 and exited 127.
  7. npm exits 1 → PinnedRuntimeInstallError → UI: Could not prepare t3@0.0.33.

Relevant packaging observation on node-pty@1.1.0 tarball contents: prebuilds exist for darwin-arm64, darwin-x64, win32-arm64, win32-x64 only.

Expected

  1. Linux installs should not require a local C++ toolchain for a normal server update (ship linux-x64 prebuilds for node-pty, or vendor a prebuilt binary for the supported Node ABI).
  2. If native compile still fails, the remote update error should include the actionable cause (e.g. missing compiler / node-gyp stderr tail), not only Could not prepare t3@X.

Workaround that unblocked us

# stage with explicit compiler
CXX=g++ CC=gcc npm install --prefix ~/.t3/runtime/versions/.staging-... --no-fund --no-audit t3@0.0.33
# then t3 service update / normal activation# prevent recurrence on the user service# ~/.config/systemd/user/t3code.service.d/40-native-build.conf# [Service]# Environment=CXX=g++# Environment=CC=gcc

Why this matters

Headless / remote Linux boxes are a first-class T3 deployment path (t3 service, Tailscale, mobile/desktop remote control). Forcing an opaque native compile on every server version bump makes remote updates fragile and hard to support.

Nice-to-haves

  • Document remote-update prerequisites (Node version, compiler, disk) if native build remains required on some platforms.
  • Consider caching successful node-pty builds across staged versions on the same Node ABI to avoid rebuild thrash.

Happy to provide redacted npm debug log excerpts if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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