denoland/deno · error

Node {} was not found!

Error message

Node {} was not found!

What it means

`deno doc` with a name filter applies find_nodes_by_name_recursively to every parsed document and bails as soon as any single document ends up with zero matching symbols. So the filter must match at least one documented symbol in *each* module in the doc set — matching in one file is not enough.

Source

Thrown at cli/tools/doc.rs:707

      no_of_files, html_options.output
    ))
  );
  Ok(())
}

fn print_docs_to_stdout(
  doc_flags: DocFlags,
  mut documents_by_url: ParseOutput,
) -> Result<(), AnyError> {
  if let Some(filter) = doc_flags.filter {
    for (_, doc) in &mut documents_by_url {
      let symbols = std::mem::take(&mut doc.symbols);
      doc.symbols = doc::find_nodes_by_name_recursively(symbols, &filter)
        .into_iter()
        .map(Arc::new)
        .collect();
      if doc.symbols.is_empty() {
        bail!("Node {} was not found!", filter);
      }
    }
  }

  let details = format!(
    "{}",
    doc::DocPrinter::new(
      &documents_by_url,
      colors::use_color(),
      doc_flags.private
    )
  );

  deno_print::drop_write_stdout(details.as_bytes());
  Ok(())
}

fn check_diagnostics(diagnostics: &[DocDiagnostic]) -> Result<(), AnyError> {

View on GitHub (pinned to f7822238ca)

Solutions

  1. Run `deno doc` without the filter and locate the exact symbol name in the output.
  2. Narrow the doc set to the entry file(s) that actually contain the symbol instead of documenting everything.
  3. Check the filter's spelling and case against the declared name.

Example fix

# before: filter must match in EVERY parsed module
deno doc --filter MyComponent src/

# after: scope to the module that defines it
deno doc --filter MyComponent src/components/mod.ts
Defensive patterns

Strategy: try-catch

Try / catch

# CI pattern: fall back to unfiltered docs if the filter misses
if ! deno doc --filter "$SYMBOL" src/mod.ts; then
  echo "filter '$SYMBOL' matched nothing in some module — dumping symbol list" >&2
  deno doc --name "$SYMBOL" src/ || true
  exit 1
fi

Prevention

When it happens

Trigger: `deno doc --filter <Name> <files...>` where <Name> exists in one entry module but not in another parsed module; a typo or wrong case in the filter; or filtering for a symbol that isn't exported/documented in every input file.

Common situations: Filtering for a class only defined in one module while deno doc parses many entry points; filtering for private/internal symbols; renaming a symbol but not the CI command that uses the old filter.

Related errors


AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20). Data as JSON: /api/errors/f11dc7945295dd44. Report an issue: GitHub.