Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output file must end with ".svg", ".png" or ".pdf" #274

Closed
DoDoENT opened this issue Apr 4, 2022 · 8 comments
Closed

Output file must end with ".svg", ".png" or ".pdf" #274

DoDoENT opened this issue Apr 4, 2022 · 8 comments

Comments

@DoDoENT
Copy link

DoDoENT commented Apr 4, 2022

Describe the bug
I installed the mmdc v8.11.0 from homebrew using brew install mermaid-cli as described in documentation and run mmdc -i documentation.template.md -o documentation.md where documentation.template.md contains mermaid snippets in markdown file. Then, instead of getting transformed MD, I got the error Output file must end with ".svg", ".png" or ".pdf".

To Reproduce
Steps to reproduce the behavior:

  1. Install latest mermaid-cli from Homebrew with brew install mermaid-cli
  2. Create a markdown file with mermaid blocks
  3. execute mmdc -i yourfile.md -o destination.md
  4. See the error

Expected behavior
Instead of error, a transformed markdown file should appear.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS
  • Browser: N/A
  • Version: 8.11.0
@metapost
Copy link

I got the same error.
macos
mmdc version: 8.11.0

@zats
Copy link

zats commented May 2, 2022

Looks like it's been fixed in the master, but the version hasn't been released yet.
FYIF, I followed the instructions from CONTRIBUTING.md and building.md to run latest version locally.
Effectively after checking out code, you'll need to:

yarn install; source copy_modules.sh
node index.bundle.js -i mydoc.template.md -o mydoc.out.md

@MindaugasLaganeckas
Copy link
Member

We are on release 9.0.3. Please, check if the error is fixed there.

@zats
Copy link

zats commented May 2, 2022

@MindaugasLaganeckas do you think it's possible that brew version hasn't been bumped? I just tried updating and it suggests that 8.11.0 is the newest version available

@MindaugasLaganeckas
Copy link
Member

We have this issue #288

@DoDoENT
Copy link
Author

DoDoENT commented May 3, 2022

But even if I install from NPM with npm install -g mermaid, I still don't get the version 9.0.3.

The version from npm, strangely, reports 0.2.4. What did I do wrong?

EDIT: OK, I needed to run npm install -g @mermaid-js/mermaid-cli. 😊 Then it works correctly.

@zats
Copy link

zats commented May 3, 2022

EDIT: OK, I needed to run npm install -g @mermaid-js/mermaid-cli. 😊 Then it works correctly.

This is a great workaround, thanks!

@MindaugasLaganeckas
Copy link
Member

I will close this issue then and leave #288 open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants