Diagram error messages

Diagram error messages

Most errors come from the renderer for the language you are using, which means they read like that language's errors rather than ours. That is a feature: the message usually points at the exact line.

The table below covers the categories, and what each one usually means in practice.


What you are seeing

  • An error message shown instead of the diagram.

  • An error in the editor while typing.

  • An error that appears only for some readers.


Work through these in order

Check

What it means and what to do

Check

What it means and what to do

A syntax error naming a line

The source has a mistake at that line. The language reference pages have working examples to compare against.

A parse error with no line

Usually the wrong language: source detected as one language but written in another.

A timeout

The diagram is too large or too slow to render. Simplify or filter it.

Nothing to render

An empty diagram, or one whose source failed to load.

A permissions error

The reader cannot see the page storing the source. This is expected behaviour for references.

A renderer unreachable error

If your site uses a self-hosted renderer, it is not responding.


A few things that catch people out

  • Check the language first. A Mermaid diagram detected as Graphviz produces confusing errors.

  • Errors from TikZ are TeX errors, which are verbose and often point one line further on than the real mistake.

  • If a diagram renders in the editor but errors on the page, that is worth reporting rather than working around.


Related

extension

Most of these take under a minute.

extension
extension