Skip to content

Conversation

@sreya
Copy link
Contributor

@sreya sreya commented Nov 16, 2025

No description provided.

When installing mux via npm as a CLI tool, Electron is not present,
causing the postinstall script to fail when trying to rebuild node-pty
for Electron ABI.

This change makes the rebuild conditional:
- If Electron is installed (dev/packaged app): rebuild for Electron ABI
- If Electron is not installed (npm CLI): use Node.js ABI (default)

This allows mux to be installed both as an Electron app (with terminal
support) and as a standalone CLI tool via npm.

_Generated with `mux`_
Replace node-pty with @homebridge/node-pty-prebuilt-multiarch which
includes prebuilt binaries for common platforms (Linux, macOS, Windows).

This allows mux to be installed on servers without requiring build tools
(python3, node-gyp, make, g++). The prebuilt package is API-compatible
with node-pty and works with both Node.js and Electron.

Fixes the error:
  node-pty [1/2] > Copying prebuilds to release folder...
  SKIPPED Prebuild directory does not exist
  /usr/bin/bash: line 1: node-gyp: command not found
  error: install script from "node-pty" exited with 127

_Generated with `mux`_
The @homebridge/node-pty-prebuilt-multiarch package includes prebuilt
binaries for both Node.js and Electron, so no rebuild is needed during
installation. This simplifies the install process and removes the need
for the postinstall script.

_Generated with `mux`_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya sreya merged commit 16fa272 into main Nov 16, 2025
13 checks passed
@sreya sreya deleted the npm branch November 16, 2025 08:04
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