Error reference / flowchart, graph

Parse error: got 'NODE_STRING'

A node ID contains an unquoted space before its shape, so Mermaid reads it as two separate statements instead of one node.

Parse error on line 2:
flowchart TD    a b[Label] --> c[Next]
------------------^
Expecting 'SEMI', 'NEWLINE', 'EOF', 'AMP', 'START_LINK', 'LINK', 'LINK_ID', got 'NODE_STRING'

Why this happens

Bare node IDs (the identifier before a shape like [Label]) can't contain spaces -- Mermaid treats whitespace as a statement separator. a b[Label] parses as node a followed by an unrelated node b[Label], which isn't valid on its own line.

This is easy to trigger by accident: typing a descriptive ID like user profile instead of userProfile or user_profile.

How to fix it

Use a single unbroken token for the node ID -- camelCase, snake_case, or hyphens all work: userProfile[Label], user_profile[Label]. Put the human-readable text inside the shape's brackets, not in the ID.

Broken

Fails to parse

Rendering preview...
flowchart TD
    a b[Label] --> c[Next]

Fixed

Renders correctly

Rendering preview...
flowchart TD
    a_b[Label] --> c[Next]
Open fixed version in studio

More errors