-
Hello. I followed this guide to use plantuml from @yhatt to use a graphiz. But I get the error bellow. engine.js file const { Marp } = require('@marp-team/marp-core')
module.exports = {
engine: opts => new Marp(opts).use(require('markdown-it-graphviz'))
} package.json file
graphviz.md file ---
marp: true
---
```graphviz
strict graph {
a -- b
a -- y
b -- a [color=blue]
}
``` command line npx marp --engine ./engine.js graphviz.md |
Beta Was this translation helpful? Give feedback.
Answered by
yhatt
Apr 21, 2023
Replies: 1 comment 3 replies
-
Multipost: See #433 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A (probably not maintained) markdown-it plugin
markdown-it-graphviz
you are trying to use is broken: aiyoudiao/markdown-it-graphviz#2 (Chinese)It tries to load a script written in ES Module
./common/viz.es-changed.js
from CommonJS scriptindex.js
, but Node.js cannot import ESM script from CJS throughrequire()
.In regards to this, there is no way to do in user-side. Try another markdown-it plugin that supports graphviz correctly.