Error reference / classDiagram

Class diagram parse error: got 'ALPHA'

A relationship arrow is missing a dash, so Mermaid can't recognize it as one of the defined class relationship types.

Parse error on line 2:
...ssDiagram    A -|> B
----------------------^
Expecting 'LINE', 'DOTTED_LINE', got 'ALPHA'

Why this happens

classDiagram relationship arrows are two characters plus a symbol: --|> for inheritance, --* for composition, --o for aggregation, ..> for dependency. A single dash before the symbol (-|> instead of --|>) isn't a recognized arrow, so the parser fails right after it.

How to fix it

Use the full two-character line: --|> for inheritance/realization, --* for composition, --o for aggregation, --> for association, ..> for dependency, ..|> for interface realization.

Broken

Fails to parse

Rendering preview...
classDiagram
    A -|> B

Fixed

Renders correctly

Rendering preview...
classDiagram
    A --|> B
Open fixed version in studio

More errors