{"record":{"id":"e68bdea11a973989","repo":"windmill-labs/windmill","slug":"to-could-not-be-resolved-details-join","errorCode":null,"errorMessage":"--to could not be resolved: ${details.join(\"; \")}.","messagePattern":"--to could not be resolved: (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/pipeline/pipeline.ts","lineNumber":803,"sourceCode":"    Boolean,\n  );\n  const ends: string[] = [];\n  const unresolved: string[] = [];\n  for (const tok of toTokens) {\n    const id = resolveToken(graph, tok);\n    if (!id) unresolved.push(tok);\n    else ends.push(id);\n  }\n  if (unresolved.length > 0) {\n    const details = unresolved.map((tok) => {\n      const matches = graph.runnables.filter(\n        (r) => r.usage_kind === \"script\" && (r.path.split(\"/\").pop() ?? r.path) === tok,\n      );\n      return matches.length > 1\n        ? `'${tok}' (ambiguous: ${matches.map((r) => r.path).sort().join(\", \")} — use the full path)`\n        : `'${tok}' (no match in f/${f})`;\n    });\n    throw new Error(`--to could not be resolved: ${details.join(\"; \")}.`);\n  }\n\n  // Readable label for a node id: `script:<path>` → `<path>`; asset ids\n  // (`<kind>:<path>`) are kept verbatim (slicing `script:` off them corrupts\n  // the name).\n  const idLabel = (id: string): string => (id.startsWith(\"script:\") ? scriptPathOf(id) : id);\n\n  const dag = buildLineageDag(graph);\n  // CUT the selection at scripts whose trigger needs caller-supplied input or\n  // per-event fanout (kafka/mqtt/nats/postgres/sqs/gcp/email/webhook/data_upload):\n  // they can't run with empty args, so no run mode — whole-pipeline, single-root,\n  // or bounded — may schedule them, nor a downstream consumer that only such a\n  // handler feeds (it would get missing/stale inputs). Exclude `starts` from the\n  // barriers: a valid start (a schedule/manual root, or an `--upload`-bound\n  // handler) runs with its own input even if it ALSO carries a non-autorun\n  // trigger — cutting it would drop a legitimately-scheduled root and its chain.\n  // An explicit mid-DAG `--from` is likewise protected: the user named it as the\n  // start, so it runs even if it also carries a non-autorun trigger.","sourceCodeStart":785,"sourceCodeEnd":821,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/pipeline/pipeline.ts#L785-L821","documentation":"Resolution report for --to tokens in the pipeline run command: one or more end-point tokens failed to resolve against the graph, and the message aggregates each with a reason — ambiguous (multiple basename matches; it lists them and says use the full path) or no match in the folder. The inputs at fault are the --to tokens as typed.","triggerScenarios":"Thrown at cli/src/commands/pipeline/pipeline.ts:803 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the full script path for tokens flagged ambiguous","Fix typos / verify paths for tokens flagged no-match (check with wmill flow ls or the UI)","Ensure the target scripts are in folder f's graph — scripts outside the scoped folder can't be ends"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}