windmill-labs/windmill · error · Error

--to could not be resolved: ${details.join("; ")}.

Error message

--to could not be resolved: ${details.join("; ")}.

What it means

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.

Source

Thrown at cli/src/commands/pipeline/pipeline.ts:803

    Boolean,
  );
  const ends: string[] = [];
  const unresolved: string[] = [];
  for (const tok of toTokens) {
    const id = resolveToken(graph, tok);
    if (!id) unresolved.push(tok);
    else ends.push(id);
  }
  if (unresolved.length > 0) {
    const details = unresolved.map((tok) => {
      const matches = graph.runnables.filter(
        (r) => r.usage_kind === "script" && (r.path.split("/").pop() ?? r.path) === tok,
      );
      return matches.length > 1
        ? `'${tok}' (ambiguous: ${matches.map((r) => r.path).sort().join(", ")} — use the full path)`
        : `'${tok}' (no match in f/${f})`;
    });
    throw new Error(`--to could not be resolved: ${details.join("; ")}.`);
  }

  // Readable label for a node id: `script:<path>` → `<path>`; asset ids
  // (`<kind>:<path>`) are kept verbatim (slicing `script:` off them corrupts
  // the name).
  const idLabel = (id: string): string => (id.startsWith("script:") ? scriptPathOf(id) : id);

  const dag = buildLineageDag(graph);
  // CUT the selection at scripts whose trigger needs caller-supplied input or
  // per-event fanout (kafka/mqtt/nats/postgres/sqs/gcp/email/webhook/data_upload):
  // they can't run with empty args, so no run mode — whole-pipeline, single-root,
  // or bounded — may schedule them, nor a downstream consumer that only such a
  // handler feeds (it would get missing/stale inputs). Exclude `starts` from the
  // barriers: a valid start (a schedule/manual root, or an `--upload`-bound
  // handler) runs with its own input even if it ALSO carries a non-autorun
  // trigger — cutting it would drop a legitimately-scheduled root and its chain.
  // An explicit mid-DAG `--from` is likewise protected: the user named it as the
  // start, so it runs even if it also carries a non-autorun trigger.

View on GitHub (pinned to e474e8803c)

Solutions

  1. Use the full script path for tokens flagged ambiguous
  2. Fix typos / verify paths for tokens flagged no-match (check with wmill flow ls or the UI)
  3. Ensure the target scripts are in folder f's graph — scripts outside the scoped folder can't be ends
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/pipeline/pipeline.ts:803 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/e68bdea11a973989. Report an issue: GitHub.