← Back to editor

Mermaid error

Mindmap indentation decides the hierarchy

Reproduced on Mermaid 11.17.2 · Updated

Mindmap indentation decides the hierarchy in Mermaid. The exact parser message, why it happens, and corrected source that renders.

What Mermaid says

There can be only one root. No parent could be found for ("Research")

Why it happens

Indentation is the only thing that says which topic owns which. A child at the same depth as the root becomes a second root, which a mindmap cannot have.

The source that fails

mindmap
  root((Product))
  Research
    Interviews

How to fix it

Use spaces throughout, and make every child strictly more indented than its parent.

mindmap
  root((Product))
    Research
      Interviews

Next steps

Paste your own version into the Mermaid repair tool, which applies this correction and fourteen others and shows every change. The related page covers the surrounding syntax, and the error dictionary lists every message.