error when generating mermaid graph through mmdc
See original GitHub issueWhen using mermaid as a graph tools, with its CLI, I have the following error in the IDEA UI:

The mmdc command line has its hashbang defined like this:
#!/usr/bin/env node
...
From my point of view, the IDE doesn’t find node, but don’t know how to check if the path variable is accessible from the plugin context.
The preview pane looks like this

For the following document, which is pretty simple:
= Example
:mermaid: /usr/local/bin/mmdc
[mermaid, communications, png, css="mermaid.css"]
----
graph TD
A --> B
----
More:
- the
mmdccomand is availaible in the$PATH - the
nodecommand is available in the$PATH
AsciiDoc Plugin Version: 0.30.6
IDE Version:
IntelliJ IDEA 2019.2.2 (Ultimate Edition)
Build #IU-192.6603.28, built on September 6, 2019
Subscription is active until April 3, 2020
Runtime version: 1.8.0_202-release-b1491 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 1450M
Cores: 8
Registry:
Non-Bundled Plugins: Key Promoter X, Lombook Plugin, com.jetbrains.jbre.bintray.downloader, mobi.hsz.idea.gitignore, net.sjrx.intellij.plugins.systemdunitfiles, org.asciidoctor.intellij.asciidoc, org.jetbrains.plugins.go-template, BashSupport, com.intellij.plugins.html.instantEditing, izhangzhihao.rainbow.brackets, org.intellij.scala, com.intellij.kubernetes
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
MMDC not found in mermaid.cli
I tried to use gatsby-remark-draw to render mermaid diagrams which includes installing mermaid and mermaid.cli . However, the diagram ...
Read more >remark-mermaid-dataurl
A remark markdown plugin that renders mermaid markdown code into SVG data URLs using mermaid-cli. Designed for use with Docusaurus v2.
Read more >mermaid.cli | Yarn - Package Manager
Command-line interface for mermaid. This CLI tool takes a mermaid definition file as input and generates svg/png/pdf file as output. Install locally. Some ......
Read more >mermaid
It calls out to the 'mmdc' executable to generate SVGs. ... Its raw contents are the plain text of the Mermaid diagram.
Read more >foliantcontrib.mermaid
This preprocessor converts Mermaid diagram definitions in your Markdown files into images ... cache_dir : Path to the directory with the generated diagrams....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I did not have the chance to test it before today…
I choose to use the following command (run in bash):
And this is working perfectly 👍
@WuglyakBolgoink I have the same issue and could resolve it like this…
Add document attribute
mmdcto tell the plugin where to find the executableEdit the file
/usr/local/bin/mmdcto point to the absolute path ofnode, rather than usingenv. Top ofmmdcfile then readsThis will of course be reverted on any update of mmdc.