phacility/phabricator · error · PhutilArgumentUsageException

No `%s` or `%s` binary was found in %s. You must install Nod

Error message

No `%s` or `%s` binary was found in %s. You must install Node.js to start the Aphlict server.

What it means

Thrown by getNodeBinary() when neither `nodejs` nor `node` can be found in $PATH. Aphlict's server is a Node.js application launched by this PHP management workflow, so Node.js is a hard dependency; the '%s' slots are filled with 'nodejs', 'node', '$PATH'.

Source

Thrown at src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php:527

      $console->writeErr("%s\n", pht('Sending %s a SIGKILL.', $pid));
      posix_kill($pid, SIGKILL);
      unset($pid);
    }

    Filesystem::remove($this->getPIDPath());
    return 0;
  }

  private function getNodeBinary() {
    if (Filesystem::binaryExists('nodejs')) {
      return 'nodejs';
    }

    if (Filesystem::binaryExists('node')) {
      return 'node';
    }

    throw new PhutilArgumentUsageException(
      pht(
        'No `%s` or `%s` binary was found in %s. You must install '.
        'Node.js to start the Aphlict server.',
        'nodejs',
        'node',
        '$PATH'));
  }

  private function getAphlictScriptPath() {
    $root = dirname(phutil_get_library_root('phabricator'));
    return $root.'/support/aphlict/server/aphlict_server.js';
  }

  private function getNodeArgv() {
    $argv = array();

    $hint = idx($this->configData, 'memory.hint');
    $hint = nonempty($hint, 256);

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Install Node.js (distro package or nodesource) and confirm `which node nodejs`
  2. If installed but not found: export PATH=$PATH:/usr/local/bin (or similar) in the launching shell/unit; for systemd add Environment=PATH=/usr/local/bin:/usr/bin:/bin to the unit
  3. For sudo contexts, check sudoers secure_path includes the directory containing node

Example fix

# before
$ bin/aphlict start  # -> No `nodejs` or `node` binary was found in $PATH
# after (Debian/Ubuntu)
$ sudo apt-get install -y nodejs
$ bin/aphlict start
# systemd unit fix:
# [Service]
# Environment=PATH=/usr/local/bin:/usr/bin:/bin
Defensive patterns

Strategy: validation

Validate before calling

if (!Filesystem::binaryExists('nodejs') && !Filesystem::binaryExists('node')) {
  throw new InvalidArgumentException(
    'Node.js not found in PATH; install it before starting aphlict');
}
// shell: command -v node nodejs

Prevention

When it happens

Trigger: Node.js not installed on the host, or installed but not on the PATH of the context launching aphlict (cron with minimal PATH, systemd unit without environment, sudo resetting PATH via secure_path).

Common situations: Fresh server provisioning that skipped the Node.js step of the install docs; Debian-family systems naming the binary nodejs while custom PATHs expect node; systemd units lacking Environment=PATH.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/430781cd1bada0ce. Report an issue: GitHub.