Skip to content

CLI fails on Fedora with versioned node binary (node-22) #2442

@David-Marsh-Photo

Description

@David-Marsh-Photo

Description

On Fedora 43, the clawdbot CLI fails with error: unknown command '/usr/bin/node-22' when running any subcommand (e.g., clawdbot tui).

Environment

  • OS: Fedora 43 (x86_64)
  • Node: v22.20.0 (installed via dnf install nodejs)
  • Clawdbot: 2026.1.23-1
  • Node binary path: /usr/bin/node-22 (symlinked from /usr/bin/node)

Root Cause

Fedora's nodejs package installs the binary as /usr/bin/node-22 (with version suffix) and creates a symlink /usr/bin/node -> node-22.

When Node runs a script, process.execPath resolves to /usr/bin/node-22 (the real binary, not the symlink).

In dist/cli/argv.js, the buildParseArgv function checks if the executable looks like node:

const executable = (normalizedArgv[0]?.split(/[/\\]/).pop() ?? "").toLowerCase();
const looksLikeNode = normalizedArgv.length >= 2 &&
    (executable === "node" ||
        executable === "node.exe" ||
        executable === "bun" ||
        executable === "bun.exe");

Since node-22 doesn't match node, looksLikeNode is false, causing the function to incorrectly prepend ["node", "clawdbot", ...] to argv. This results in malformed argv that commander.js can't parse.

Suggested Fix

Add support for versioned node binaries:

const looksLikeNode = normalizedArgv.length >= 2 &&
    (executable === "node" ||
        executable === "node.exe" ||
        executable.startsWith("node-") ||  // Add this line
        executable === "bun" ||
        executable === "bun.exe");

Workaround

Manually edit ~/.npm-global/lib/node_modules/clawdbot/dist/cli/argv.js and add executable.startsWith("node-") to the condition.

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