mermaid-js/mermaid · error · Error
No such shape: ${doc.shape}.
Error message
No such shape: ${doc.shape}. What it means
Error "No such shape: ${doc.shape}." thrown in mermaid-js/mermaid.
Source
Thrown at packages/mermaid/src/diagrams/flowchart/flowDb.ts:240
classes.forEach((s) => {
vertex.classes.push(s);
});
}
if (dir !== undefined) {
vertex.dir = dir;
}
if (vertex.props === undefined) {
vertex.props = props;
} else if (props !== undefined) {
Object.assign(vertex.props, props);
}
if (doc !== undefined) {
if (doc.shape) {
if (doc.shape !== doc.shape.toLowerCase() || doc.shape.includes('_')) {
throw new Error(`No such shape: ${doc.shape}. Shape names should be lowercase.`);
} else if (!isValidShape(doc.shape)) {
throw new Error(`No such shape: ${doc.shape}.`);
}
vertex.type = doc?.shape;
}
if (doc?.label) {
vertex.text = doc?.label;
vertex.labelType = this.sanitizeNodeLabelType(doc?.labelType);
}
if (doc?.icon) {
vertex.icon = doc?.icon;
if (!doc.label?.trim() && vertex.text === id) {
vertex.text = '';
}
}
if (doc?.form) {
vertex.form = doc?.form;
}
if (doc?.pos) {View on GitHub (pinned to d93e9c88c0)
When it happens
Trigger: Thrown at packages/mermaid/src/diagrams/flowchart/flowDb.ts:240 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mermaid-js/mermaid@d93e9c88c0 (2026-08-12).
Data as JSON: /api/errors/15512603d20643cc.
Report an issue: GitHub.