KcFnMi
KcFnMi

Reputation: 6171

mermaid-cli Input file "/data/diagram.mmd" doesn't exist

Following https://github.com/mermaid-js/mermaid-cli

On macOS, I installed it with docker

docker pull minlag/mermaid-cli

and then created diagrams/diagram.mmd

and then

docker run -it -v diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd

and then

Input file "/data/diagram.mmd" doesn't exist

What should I do?

Upvotes: 0

Views: 311

Answers (1)

The problem is that formattet like this:

docker run -it -v diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd

It uses diagrams as a named-volume, not a path. Like this it should work, though is not so usefull:

docker run -it -v /full/path/to/diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd

It's more cross-system-friendly if you replace the path with pwd, though then you also limit execution to the directory where the diagrams directory is located.

docker run -it -v `pwd`/diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd

Upvotes: 1

Related Questions