Error reference / flowchart, graph

Parse error: got 'SQS'

A node's square-bracket label was never closed, so the parser runs into the next node's opening bracket before it finds the one it was expecting.

Parse error on line 2:
...issing bracket --> b[Done]
-----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', ... got 'SQS'

Why this happens

Every node shape has a matching close: [ needs ], ( needs ), { needs }. Forgetting the closing bracket on one node means the parser keeps consuming text -- including the arrow and the next node's opening bracket -- looking for the delimiter it was promised.

SQS is Mermaid's internal name for a square-bracket start ([). Seeing it as the unexpected token almost always means an earlier ] is missing.

How to fix it

Scan backward from the reported line for the most recent [ that has no matching ]. It's usually one or two nodes earlier than the line the error points at, because the parser only fails once it hits the next bracket.

MermaidPen's editor highlights the exact failing line so you don't have to count brackets by hand.

Broken

Fails to parse

Rendering preview...
flowchart TD
    a[Missing bracket --> b[Done]

Fixed

Renders correctly

Rendering preview...
flowchart TD
    a[Has a closing bracket] --> b[Done]
Open fixed version in studio

More errors