Giter Site home page Giter Site logo

Comments (6)

LarryBattle avatar LarryBattle commented on August 11, 2024

I just tested out your file on "@mermaid-js/mermaid-cli": "^8.5.1-2" on Ubuntu and it generated the correct diagram without any errors.

The error in the stacktrace (stateDiagram s1: In) looks like mermaid-cli was unable to read the line breaks in the file.
Try recreating diagram.mmd in an different text editor on the same system then re-run your command. ./node_modules/.bin/mmdc -i diagram.mmd -o diagram.png

from mermaid-cli.

diegobernardes avatar diegobernardes commented on August 11, 2024

Still giving me an error. There is no hidden char at the file, look at the editor showing all the chars.

image

This editor is the VSCode. I've tried to use Vim as well, same problem.

from mermaid-cli.

MindaugasLaganeckas avatar MindaugasLaganeckas commented on August 11, 2024

Hey @diegobernardes, I have tried to reproduce the error you have reported without any luck. From the error message it seems clear, that there is something wrong with your input file. Anyhow, I have created a branch for your case. You can find your state file here: https://github.com/MindaugasLaganeckas/mermaid-cli/blob/issue/4/test/issue-4.mmd and the diagram, generated by mermaid-cli, here: https://github.com/MindaugasLaganeckas/mermaid-cli/suites/844280879/artifacts/9556201. The filename to look for is issue-4.mmd.svg. You are welcome to download the file issue-4.mmd AS IS, install the newest mermaid-cli (8.5.3) and generate the diagram yourself.

from mermaid-cli.

Kochise avatar Kochise commented on August 11, 2024

Got this (see attached picture)

state

Check this : #503

The old repo (v0.5.1) is not functional, use the new repo (v8.+). It's confusing, but 'mermaidjs' is not the same as 'mermaid-js'.

npm install -g mermaid.cli ---> fails (v0.5.1)
npm install -g @mermaid-js/mermaid-cli ---> works (v8.+)

from mermaid-cli.

MindaugasLaganeckas avatar MindaugasLaganeckas commented on August 11, 2024

Cannot reproduce. No answer from the reporter.

from mermaid-cli.

yannicschroeer avatar yannicschroeer commented on August 11, 2024

I was able to reproduce this by using Node v16. Using Node v18 resolved this issue for me.

from mermaid-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.