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
Describe the bug
I'm attempting to create an SVG from a Markdown file containing a mermaid diagram. I'm using ELK as the default renderer. The CLI crashes at the Mermaid subgraph. It is able to create an SVG file if I remove the subgraph.
To Reproduce
Steps to reproduce the behavior:
Create a Markdown file with a mermaid diagram with ELK as the default renderer and with a subgraph. This is mine.
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
flowchart TB
subgraph hi
a
end
Loading
Or without the mermaid code block
%%{init: {"flowchart": {"defaultRenderer": "elk"}}}%%
flowchart TB
subgraph hi
a
end
Run the CLI mmdc -i input_diagram.md -o output.svg
This is the error I get
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'children')
at file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:1358:3410
at Array.forEach (<anonymous>)
at M3e (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:1358:3396)
at file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:1358:3507
at Array.forEach (<anonymous>)
at M3e (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:1358:3396)
at Object.fjt [as draw] (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:1358:5185)
at async Object.jDt [as render] (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/dist/index.html:88:840)
at ExecutionContext._ExecutionContext_evaluate (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:254:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:143:16)
at async CDPJSHandle.evaluate (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js:56:16)
at async CDPElementHandle.$eval (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ElementHandle.js:86:24)
at async renderMermaid (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:246:22)
at async file:///Users/xxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:442:41
at async Promise.all (index 0)
at async run (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:461:22)
at async cli (file:///Users/xxxx/.nvm/versions/node/v18.7.0/lib/node_modules/@mermaid-js/mermaid-cli/src/index.js:184:3)
Expected behavior
I expect an SVG to be generated.
Desktop (please complete the following information):
OS: Mac
MMDC Version: 10.4.0
The text was updated successfully, but these errors were encountered:
I am seeing this issue as well. This is a critical issue since I am using Mermaid for automatically generated graphs that are large and complex, for which the elk renderer is essential as the default renderer can't handle the graphs well. I see the exception for any output format.
Also, the Mermaid Live Editor can't handle these type of graphs either.
In fact, the only way I have been able to even render these diagrams is with GitHub's Mermaid rendering in Markdown documents.
Describe the bug
I'm attempting to create an SVG from a Markdown file containing a mermaid diagram. I'm using ELK as the default renderer. The CLI crashes at the Mermaid subgraph. It is able to create an SVG file if I remove the subgraph.
To Reproduce
Steps to reproduce the behavior:
Or without the mermaid code block
Run the CLI
mmdc -i input_diagram.md -o output.svg
This is the error I get
Expected behavior
I expect an SVG to be generated.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: