{"record":{"id":"430781cd1bada0ce","repo":"phacility/phabricator","slug":"no-s-or-s-binary-was-found-in-s-you-must-i","errorCode":null,"errorMessage":"No `%s` or `%s` binary was found in %s. You must install Node.js to start the Aphlict server.","messagePattern":"No `(.+?)` or `(.+?)` binary was found in (.+?)\\. You must install Node\\.js to start the Aphlict server\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php","lineNumber":527,"sourceCode":"      $console->writeErr(\"%s\\n\", pht('Sending %s a SIGKILL.', $pid));\n      posix_kill($pid, SIGKILL);\n      unset($pid);\n    }\n\n    Filesystem::remove($this->getPIDPath());\n    return 0;\n  }\n\n  private function getNodeBinary() {\n    if (Filesystem::binaryExists('nodejs')) {\n      return 'nodejs';\n    }\n\n    if (Filesystem::binaryExists('node')) {\n      return 'node';\n    }\n\n    throw new PhutilArgumentUsageException(\n      pht(\n        'No `%s` or `%s` binary was found in %s. You must install '.\n        'Node.js to start the Aphlict server.',\n        'nodejs',\n        'node',\n        '$PATH'));\n  }\n\n  private function getAphlictScriptPath() {\n    $root = dirname(phutil_get_library_root('phabricator'));\n    return $root.'/support/aphlict/server/aphlict_server.js';\n  }\n\n  private function getNodeArgv() {\n    $argv = array();\n\n    $hint = idx($this->configData, 'memory.hint');\n    $hint = nonempty($hint, 256);","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php#L509-L545","documentation":"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'.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Install Node.js (distro package or nodesource) and confirm `which node nodejs`","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","For sudo contexts, check sudoers secure_path includes the directory containing node"],"exampleFix":"# before\n$ bin/aphlict start  # -> No `nodejs` or `node` binary was found in $PATH\n# after (Debian/Ubuntu)\n$ sudo apt-get install -y nodejs\n$ bin/aphlict start\n# systemd unit fix:\n# [Service]\n# Environment=PATH=/usr/local/bin:/usr/bin:/bin","handlingStrategy":"validation","validationCode":"if (!Filesystem::binaryExists('nodejs') && !Filesystem::binaryExists('node')) {\n  throw new InvalidArgumentException(\n    'Node.js not found in PATH; install it before starting aphlict');\n}\n// shell: command -v node nodejs","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include Node.js in provisioning and assert `command -v node` in deploy pre-flight","For systemd/cron launches, set an explicit Environment=PATH that includes the node binary's directory"],"tags":["aphlict","nodejs","dependencies","path","phabricator"],"backgroundTag":"missing-executable-dependency","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}