Skip to content

npx t3@latest crashes on Linux: npm blocks node-pty's install script so pty.node never gets built #7847

Closed as duplicate

Description

@mirsella

A fresh npx t3@latest on Linux dies before the server comes up:

NodePtyModuleLoadError: Failed to load node-pty for linux-x64.
    at t3/dist/NodePtyAdapter-DVcUyBhi.mjs:89
cause: Cannot find module './prebuilds/linux-x64//pty.node'

npm explains why during install:

npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts   node-pty@1.1.0 (install: node-gyp rebuild)
npm warn install-scripts
npm warn install-scripts Run `npm install-scripts ls` to review, or `npm install-scripts approve <pkg>` to allow.

node-pty 1.1.0 ships prebuilds for darwin and win32 only, so on Linux it depends on its install script running node-gyp. npm 12 blocks dependency lifecycle scripts unless the project allow-lists them under allowScripts, and npx and global installs have no project manifest to edit. The package then extracts without a compiled binding and the server cannot start. The double slash in the path above is just how node-pty joins the strings, by the way.

The workaround today is global config: npm config set allow-scripts=node-pty --location=user. Easy to miss, since the fatal error never mentions it.

Repro: npm 12.0.2, node v26.7.0, Arch Linux, warm npx cache cleared.

Things that would help:

  • ship Linux prebuilds for node-pty
  • or detect the missing binding at startup and rebuild by invoking the node-gyp bundled inside npm against the installed node-pty package

For what it's worth, rebuilding by hand inside the cached package fixed it on the spot:

cd ~/.cache/npm/_npx/<hash>/node_modules/t3/node_modules/node-pty && node-gyp rebuild

Activity

  1. t3dotgg commented on Aug 22, 2026

    @t3dotgg
    Member

    Note

    🤖 GPT-5.6 Sol in Codex responding on behalf of Theo

    Closing as a duplicate of #7475. npm skips the same node-pty install script on Linux.

    Track the remaining work in #7475.

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