{"record":{"id":"430626247c314ce2","repo":"paperclipai/paperclip","slug":"command-not-found-in-path-command","errorCode":null,"errorMessage":"Command not found in PATH: \"${command}\"","messagePattern":"Command not found in PATH: \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/server-utils.ts","lineNumber":3460,"sourceCode":"  const pathValue = env.PATH ?? env.Path ?? \"\";\n  const delimiter = process.platform === \"win32\" ? \";\" : \":\";\n  const dirs = pathValue.split(delimiter).filter(Boolean);\n  const exts = process.platform === \"win32\" ? windowsPathExts(env) : [\"\"];\n  const hasExtension =\n    process.platform === \"win32\" && path.extname(command).length > 0;\n\n  for (const dir of dirs) {\n    const candidates =\n      process.platform === \"win32\"\n        ? hasExtension\n          ? [path.join(dir, command)]\n          : exts.map((ext) => path.join(dir, `${command}${ext}`))\n        : [path.join(dir, command)];\n    for (const candidate of candidates) {\n      if (await pathExists(candidate)) return candidate;\n    }\n  }\n\n  return null;\n}\n\nexport async function resolveCommandForLogs(\n  command: string,\n  cwd: string,\n  env: NodeJS.ProcessEnv,\n  options: {\n    remoteExecution?: RemoteExecutionSpec | null;\n  } = {},\n): Promise<string> {\n  const remote = options.remoteExecution ?? null;\n  if (remote) {\n    return `ssh://${remote.username}@${remote.host}:${remote.port}/${remote.remoteCwd} :: ${command}`;\n  }\n  return (await resolveCommandPath(command, cwd, env)) ?? command;\n}\n","sourceCodeStart":3442,"sourceCodeEnd":3478,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/server-utils.ts#L3442-L3478","documentation":"Error \"Command not found in PATH: \"${command}\"\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapter-utils/src/server-utils.ts:2470 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install \"${command}\" or add it to PATH."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}