question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mermaid syntax errors are not displayed

See original GitHub issue

Describe the bug When the input file contains a syntax error, the output is “Generating single mermaid chart” and the generated image contains “Syntax error in graph”.

To Reproduce Steps to reproduce the behavior:

I am using the docker container

  1. My input file is in $HOME/Mermaid folder
  2. Execute : docker run -u 1000 -it --rm -v $HOME/Mermaid:/data minlag/mermaid-cli -i "/data/seq-diagram.mmd" -o "/data/seq-diagram.png"
  3. You get the “Generating single mermaid chart” message and the generated image contains “Syntax error in graph”

Inside the container I do not get any other message

  1. My input file is in $HOME/Mermaid folder
  2. Go inside the container : docker run -u 1000 -it --rm --entrypoint /bin/sh -v $HOME/Progs/Mermaid:/data minlag/mermaid-cli
  3. Execute : ./node_modules/.bin/mmdc -p "/puppeteer-config.json" -i "/data/seq-diagram.mmd" -o "/data/seq-diagram.png"
  4. You get the “Generating single mermaid chart” message and the generated image contains “Syntax error in graph”

Expected behavior I would like to see the syntax error so that I can fix it

Parse error on line 30:
...ger->>ABC auth->> User    SMS au
-----------------------^
Expecting 'TXT', got 'SOLID_ARROW'

Screenshots seq-diagram

Desktop:

  • OS: Ubuntu
  • Version 20.04
  • Browser inside the container :
$ /usr/bin/chromium-browser --version
Chromium 99.0.4844.84

$ ./node_modules/.bin/mmdc -p "/puppeteer-config.json" --version
8.14.0

Additional context I am not used to JavaScript but it seems like the following question in SO : https://stackoverflow.com/questions/51907677/log-console-calls-made-in-client-side-code-from-the-puppeteer-node-js-process

It seems that you could catch console events that happen in puppeteer / chromium to log them in Node … as I understand it

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MindaugasLaganeckascommented, May 18, 2022

@multimeric Done! https://github.com/mermaid-js/mermaid/pull/3052 Thank you for your help! You are welcome to create PRs for the functionality which is missing in mermaid-cli - I will review them and accept if no issues 😄

0reactions
MindaugasLaganeckascommented, May 17, 2022

Thank you! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refreshing page will show Syntax error in mermaid graph ...
Always show the correctly rendered MermaidJS graph. Actual behaviour. Sometimes normal, while sometimes not. Refreshing page but with cache ...
Read more >
Mermaid syntax error on trying render a diagram on Github ...
Mermaid syntax error on trying render a diagram on Github . md file - Stack Overflow. Stack Overflow for Teams – Start collaborating...
Read more >
Standard mermaid syntax for flowchart links not rendered in ...
While using standard syntax for ranking link, an error is produced at rendering, and no flowchart is displayed.
Read more >
Valid mermaid syntax reporting errors - Visual Studio Feedback
We've just started using the Wiki in our Azure DevOps project and I'm working on some simple introductions to using the key features....
Read more >
Markdown mermaid ClassDiagram annotations generate ...
The generated class diagram should have the annotation displayed in the digaram. What happens instead? The block displays a error "Syntax error in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found