Skip to content

Bug: bunx t3@alpha fails on Linux rebuilding node-pty #204

Description

@sadiksaifi

Problem

Running bunx t3@alpha on Linux fails during dependency installation because node-pty tries to rebuild from source and requires node-gyp, even though the same package works with npx t3@alpha.

Reproduction

bunx t3@alpha

Output:

⚙️  node-pty [1/3] > Checking prebuilds...
> Rebuilding because directory /tmp/bunx-1000-t3@alpha/node_modules/node-pty/prebuilds/linux-x64 does not exist

/usr/bin/bash: line 1: node-gyp: command not found

error: install script from "node-pty" exited with 127

Expected

bunx t3@alpha installs and launches successfully, or at least handles the missing native build dependency more gracefully.

Actual

The install fails before the CLI can start.

Notes

  • npx t3@alpha works on the same machine.
  • I was using the latest t3@alpha available at the time of testing.
  • Environment: Linux x64.

This seems like a Bun/Bunx compatibility issue around how node-pty prebuilds are resolved from the temporary install directory.

Activity

  1. sadiksaifi commented on Mar 7, 2026

    @sadiksaifi
    Author

    @juliusmarminge @t3dotgg I can work on it, although here is the prompt:

    PROMPT

    You are helping me fix a bun/bunx compatibility issue.
    
    Problem:
    Running bunx t3@alpha on Linux fails during install with this error:
    
    node-pty [1/3] > Checking prebuilds...
    Rebuilding because directory /tmp/bunx-1000-t3@alpha/node_modules/node-pty/prebuilds/linux-x64 does not exist
    
    /usr/bin/bash: line 1: node-gyp: command not found
    
    error: install script from "node-pty" exited with 127
    
    Important context already discovered:
    t3 depends on node-pty in apps/server/package.json
    On Bun and non-Windows, the app appears to use Bun’s PTY implementation, not node-pty
    Relevant files:
    apps/server/package.json
    apps/server/src/serverLayers.ts
    apps/server/src/terminal/Layers/BunPTY.ts
    apps/server/src/terminal/Layers/NodePTY.ts
    node-pty version 1.1.0 appears not to ship Linux prebuilds in the published package, which causes a fallback to node-gyp rebuild
    npx t3@alpha works, but bunx t3@alpha fails
    A likely fix is either:
    upgrade node-pty to a version that ships Linux prebuilds
    or avoid requiring/installing node-pty for Bun runtime paths where it is not used
    
    What I want from you:
    First, research the codebase and confirm the root cause precisely.
    Then reproduce or reason through the failure path.
    Then propose the best fix, plus one or two alternatives with tradeoffs.
    Be interactive: after research, pause and present options with a recommendation before making code changes.
    Once I choose, implement the fix cleanly.
    Run relevant verification steps and summarize results clearly.
    
    How to work:
    Start by inspecting the files above and any related packaging, build, or runtime-selection code.
    Check whether node-pty is truly required at install time for Bun users.
    Check whether upgrading node-pty is safe and whether the newer package includes Linux prebuilds.
    If you find a better fix than my hypotheses, explain it.
    Do not commit, push, or open a PR unless I explicitly ask.
    Do not make destructive git changes.
    Prefer small, minimal, maintainable changes.
    If there is ambiguity that materially changes the fix, ask exactly one targeted question after doing the non-blocked research.
    
    Output format I want:
    First, give a short root-cause explanation.
    Then give two or three fix options with pros and cons.
    Then give your recommendation.
    Then stop and wait for my choice before editing code.
    
    If I approve implementation, then:
    Make the code changes.
    Run the smallest relevant validation set first.
    If needed, expand to broader validation.
    Then tell me:
    what changed
    why it fixes the problem
    what you verified
    any residual risks or follow-ups
  2. t3dotgg commented on Mar 7, 2026

    @t3dotgg
    Member

    We do not support Bun and probably won't ever support it for the runner. Solution is to either force it to always execute through Node, or error when you try to execute through Bun. I don't feel strongly about either solution.

  3. added
    bugSomething is broken or behaving incorrectly.
    on Mar 7, 2026
  4. 0x63616c commented on Mar 24, 2026

    @0x63616c

    @t3dotgg maybe you posted else where and I didn't see but why no support for bun?

    I ran into this issue and found this thread, so would +1 on a nicer message

    ➜  ~ bunx t3
    [10:31:07.057] ERROR (#1): TypeError: parent.currentScheduler.scheduleTask is not a function
        at forkUnsafe (file:///private/tmp/bunx-501-t3@latest/node_modules/effect/dist/internal/effect.js:1984:29)
    
  5. sadiksaifi commented on Mar 25, 2026

    @sadiksaifi
    Author

    @0x63616c this has been fixed in #1311

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

    bugSomething is broken or behaving incorrectly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions