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.

Yesterday, I had to work with mermaid for the first time. I noticed error messages coming from the plugin saying, that no mermaid executable is installed.

Failed to generate image: Could not find the 'mermaid' executable in PATH; 
add it to the PATH or specify its location using the 'mermaid' document attribute

So I searched for a way to install it and found out that I need to install npm first.

npm install -g mermaid.cli

After I installed it, the plugin was broken in such a way that the preview pane only displays “initializing…” and never changes to the preview.

AsciiDoc Example for rendering mermaid:

a test

[mermaid]
----
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
----

AsciiDoc Plugin Version: 0.30.86

IDE Name and Version:

IntelliJ IDEA 2020.1.4 (Ultimate Edition)
Build #IU-201.8743.12, built on July 21, 2020
Runtime version: 11.0.7+10-b765.65 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0

Update: after quite a while the diagram was rendered. I tried to modify it but It didn’t re-render. Instead, I got the following error message in the Event Log:

Error during rendering scratch_13.adoc
	uri:classloader:/gems/asciidoctor-diagram-2.0.2/lib/asciidoctor-diagram/util/cli_generator.rb:50: warning: Tempfile#unlink or delete called on open file; ignoring

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aricommented, Sep 29, 2020

Never mind. I’ve moved over to PlantUML and although there was more work to set up nice styling, it has a lot more flexibility and the integration is easier.

1reaction
ahus1commented, Aug 20, 2020

I gave mermaid a try. I found that after installing mermaid (like you did), the IDE preview behaved strangely:

  • mermaid CLI starts node, that then starts an (old) version of chromium to render the preview
  • an invalid diagram (while typing contents) seemed to stall the mermaid rendering
  • I was able to unblock the preview by killing the node process
  • even when rendering valid diagrams the preview is quite slow

The preview might be more interactive if the mermaid would use just JavaScript in the preview (like MathJax). This way it would be interruptable when a timeout occurs, and wouldn’t need to start so many processes in the background.

Someone would need to give it a try to see if it is possible.

I’d like to see some votes/comments on this to find out if there is demand for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mermaid Problem - TV Tropes
That isn't to say, of course, that mermaids are completely lacking in sexual organs. Real fish, of course, have actual genitals. They just...
Read more >
Mermaid Problems - AquaMermaid
Water is essential for mermaids, but it sure can be pesky! Getting in your eyes, nose, and also causing pain in your ears!...
Read more >
Polish Artist Reveals the Problems That Mermaid's are ...
She dragged attention with her comic series called “Mermaid Problems” where she shares the struggles of her aquatic characters.
Read more >
Mermaid Problems (@mermaidproblems) • Instagram photos ...
Mermaid Problems. 50 posts. 784 followers. 325 following. More mermaid bras styles on sale! Use coupon code: CYBERMONDAY to receive 20%.
Read more >
Mermaid Problems (@Mermaid_Problem) - Pinterest
Jul 27, 2016 - The latest Tweets from Mermaid Problems (@Mermaid_Problem). Flippin' your fins, you don't get too far... #mermaidproblems. under da sea....
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