Open HariSekhon opened 1 year ago
Diagram error not found.
this error has been fixed in our newer releases (Github is few release behind). But I do agree that the error messages could be more helpful.
Good to know, thanks!
I'll leave this open for people to find until the fix is live on GitHub, at which time the above should show a more specific error message.
@HariSekhon Clear the browser cache and then run it again, it worked for me.
Is this issue still alive ?
yes i encountered this issue in my repo, is it still not fixed
Same, I am facing the same issue in my repo. I even tried clearing my cache, seems to still not work.
I getting the same error by using zenuml
in github README.md
What was happening to me is that I was using markdown syntax without the quotes:
flowchart TD
A["💠"]
flowchart TD
A["💠"]
flowchart TD
A[💠]
flowchart TD
A[💠]
For me GitHub markdown uses old mermaid version probably v9 that's why v10 mermaid doesn't give me any error, but i see the Unable to render
error in Github markdown pages
I have the same issue. In my case it's important that it works well every time. I try to like diagrams-as-code but it looks like good ol' static SVG will be better forever.
+1 from me. It's annoying that VS Code extension previews work perfectly on content, then you push to Github and see the red error box.
+1 still not working
I was able to work-around my issue by writing different Mermaid syntax, e.g.
graph LR
instead of
flowchart LR
And wrapping names that include a newline in " quotes.
I believe this is due to Github rendering with an earlier version of Mermaid (version 9 instead of the latest?) and so it's not the Mermaid project we need to complain to.. perhaps here?
https://github.com/orgs/community/discussions/70672
See also:
I was able to work around the issue by adding some quotes. around text block and removing embedded markdown.
I was able to work around the issue by adding some quotes. around text block and removing embedded markdown.
I was encountering the same phenomenon, but by taking the above measures, I was able to solve the problem! Thank you very much!
I was able to work around the issue by adding some quotes. around text block and removing embedded markdown.
@greg7mdp can u share an example or share the repo, because I am still facing the issue
I was able to work around the issue by adding some quotes. around text block and removing embedded markdown.
@greg7mdp can u share an example or share the repo, because I am still facing the issue
Sure this commit fixed my issue and the mermaid displayed in github after that.
thanks, bud
It also doesn't like any dashes -
or underscores _
in ids.
As of this writing I am facing this issue with an ER Diagram. It works fine with live editor. I created a very simple mmd file called test.mmd to display mermaid version and throws the error. From what I understand it should show the mermaid version github is using to render but it just errors out.
info
The error from GitHub is incredibly unhelpful. Especially when the diagram works fine in https://mermaid.live so there's no indication of why GitHub is choking on it.
It would help if it included:
That's not really Mermaid's problem though.
Mermaid js does not like the string self
appearing in a label for a node:
flowchart TD;
my_self["me"]
other["thing"]
my_self --> other
vs
flowchart TD;
my_thing["me"]
other["thing"]
my_thing --> other
This took ages to figure out by basically bisecting my diagram then changing things until the error went away.
The issue is still open? Does github support mermaid keyword style? When I add style to it, it shows the same error.
Description
When editing MermaidJS in GitHub markdown I am finding Mermaid is often failing without giving an error message, making it difficult to find where the problem is.
This seems like something that needs to be fixed / improved otherwise debugging graphs is difficult.
Steps to reproduce
From my repo: https://github.com/HariSekhon/Diagrams-as-Code
Here is what I created:
and when I change the init
mainBranchName
field todev
and update all branch references frommain
todev
, I get a very generic error with no line number, leaving me to scour every character in 100 lines of code:The diff between the two graph codes seems pretty clean on diff:
so I can't see why this doesn't work.
Is MermaidJS sensitive to whitespace?
I've even eliminated whitespace difference that I could see with
cat -e
on Mac and verified this via:Ultimately I think MermaidJS error messages need to be improved to give accurate feedback of why the code doesn't work.
In the Live Editor I get this error:
Eventually I've found the problem being that
mainBranchName
was being ignored because it wasn't wrapped in'gitGraph': {}
.This was harder to find than it should have been, and also any tiny mistake such as missing a comma after
'gitGraph': {}
becomes difficult to find without an error message and line number, in this case you're squinting at 100 lines looking for any character out place...Screenshots
See above
Code Sample
Setup
Additional Context
No response