Closed jaques-sam closed 1 year ago
Investigated a bit further myself. Seems I installed an old version :-o Why is there an official "mmdc" package that's doing the same more or less and why is it so old and not working???
Probably tried before (and missed the error before), this was the issue:
❯ sudo npm install -g @mermaid-js/mermaid-cli
[sudo] password for samja:
npm ERR! code EEXIST
npm ERR! path /usr/local/bin/mmdc
npm ERR! EEXIST: file already exists
npm ERR! File exists: /usr/local/bin/mmdc
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-06-15T09_32_30_438Z-debug-0.log
Solved by removing it manually:
❯ sudo rm -rf /usr/local/bin/mmdc
Reinstalled using correct (new?) install method:
❯ sudo npm install -g @mermaid-js/mermaid-cli
Hmmmm, that's weird. I actually own the mmdc
package, but the only thing it does is install @mermaid-js/mermaid-cli
, see https://www.npmjs.com/package/mmdc.
Because of that, it should be completely compatible with npm install -g @mermaid-js/mermaid-cli
.
(it's mainly there to prevent someone else from stealing the mmdc
package and sticking some malicious code there, like the tsc
package)
IMO, in case you're curious, there's some discussion about possibly changing the name of this package in https://github.com/mermaid-js/mermaid-cli/issues/433!
Description mmdc doesn't generate a file nor outputs any error. I tried all 3 supported output types. I tried also inside the directory itself. I did an
npm uninstall mmdc
+npm install mmdc
None of them worked.How to reproduce
Expected behavior I expect the png/pdf/svg file being generated.
Desktop