langgenius/dify · error · Error

Command failed (${result.exitCode}): ${formatCommand(options

Error message

Command failed (${result.exitCode}): ${formatCommand(options.command, options.args)}

What it means

Error "Command failed (${result.exitCode}): ${formatCommand(options.command, options.args)}" thrown in langgenius/dify.

Source

Thrown at e2e/scripts/common.ts:105

  }

  return await new Promise<RunCommandResult>((resolve, reject) => {
    childProcess.once('error', reject)
    childProcess.once('exit', (code) => {
      resolve({
        exitCode: code ?? 1,
        stdout,
        stderr,
      })
    })
  })
}

export const runCommandOrThrow = async (options: RunCommandOptions) => {
  const result = await runCommand(options)

  if (result.exitCode !== 0) {
    throw new Error(
      `Command failed (${result.exitCode}): ${formatCommand(options.command, options.args)}`,
    )
  }

  return result
}

export const getTcpPortListenerDescription = async (port: number) => {
  if (process.platform === 'win32') return ''

  const result = await runCommand({
    command: 'lsof',
    args: ['-nP', `-iTCP:${port}`, '-sTCP:LISTEN'],
    cwd: rootDir,
    stdio: 'pipe',
  })

  if (result.exitCode !== 0) return ''

View on GitHub (pinned to ef8544b173)

When it happens

Trigger: Thrown at e2e/scripts/common.ts:105 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/de921547564ca96a. Report an issue: GitHub.