You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mermaid code below produces a "TypeError: Cannot set properties of undefined (setting 'rank')".
This only happens when inner has a numeric identifier. The diagram renders correctly when replacing 1 with a letter.
graph LR
subgraph outer
subgraph 1 ["inner"]
external
subgraph sub
internal
end
sub-->external
end
end
Loading
Backtrace:
TypeError: Cannot set properties of undefined (setting 'rank')
at #evaluate (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:388:19)
at async ExecutionContext.evaluate (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:275:16)
at async IsolatedWorld.evaluate (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:97:16)
at async CdpJSHandle.evaluate (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/api/JSHandle.js:146:20)
at async CdpElementHandle.evaluate (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.js:340:20)
at async CdpElementHandle.$eval (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/api/ElementHandle.js:494:24)
at async CdpFrame.$eval (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:450:20)
at async CdpPage.$eval (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:450:20)
at async renderMermaid (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:266:22)
at recursiveRender (.../.nvm/versions/node/v22.22.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/mermaid/dist/mermaid.js:58234:8)
Description
The mermaid code below produces a "TypeError: Cannot set properties of undefined (setting 'rank')".
This only happens when
innerhas a numeric identifier. The diagram renders correctly when replacing1with a letter.Steps to reproduce
Example diagram:
Render error:
graph LR subgraph outer subgraph 1 ["inner"] external subgraph sub internal end sub-->external end endBacktrace:
Screenshots
No response
Code Sample
Setup
Suggested Solutions
No response
Additional Context
No response