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

classDiagramm example fails on macOs #454

Closed
chbndrhnns opened this issue Jan 10, 2017 · 11 comments
Closed

classDiagramm example fails on macOs #454

chbndrhnns opened this issue Jan 10, 2017 · 11 comments
Labels
Type: New Shape Request for new shape

Comments

@chbndrhnns
Copy link

chbndrhnns commented Jan 10, 2017

When I run mermaid 6.0.0 on the classDiagram example I get a picture as attached.

mermaid_demo01 txt

@knsv
Copy link
Collaborator

knsv commented Jan 10, 2017

Hello. That looks like some styling is lost. Is the mermaid.css in place?

@chbndrhnns
Copy link
Author

chbndrhnns commented Jan 10, 2017

All other examples can be compiled without problems.

For this, I created a virtualenv, ran
npm install mermaid --save-dev
and which mermaid gives me
.virtualenvs/mermaid/bin/mermaid.

Specifying the -t option with the normal mermaid.css does help not either and the debug output looks like this: http://pastebin.com/y5vjp2jV

@terciodemelo
Copy link

terciodemelo commented Jan 13, 2017

Not only in Mac, it is also failing in my ubuntu 16.04, with node v6.3.1, phantomjs 2.1.1, and mermaid 6.0.0. I get the same output =(

@terciodemelo
Copy link

terciodemelo commented Jan 13, 2017

It is probably a parsing problem, when I use a %% before the diagram it fails completly, below is the diagram code as I used, and bellow it is the error message when running mermaid <file_name>:

%% A Class diagram
classDiagram
    Class01 <|-- AveryLongClass : Cool
    Class03 *-- Class04
    Class05 o-- Class06
    Class07 .. Class08
    Class09 --> C2 : Where am i?
    Class09 --* C3
    Class09 --|> Class07
    Class07 : equals()
    Class07 : Object[] elementData
    Class01 : size()
    Class01 : int chimp
    Class01 : int gorilla
    Class08 <--> C2: Cool label

Output:

Num files to execute : 1
ready to execute png: class_diagram_example.png
CONSOLE: [17:38:07 (172)]  Starting rendering diagrams (from line # in "")
CONSOLE: [17:38:07 (172)]  Start On Load before: undefined (from line # in "")
CONSOLE: [17:38:07 (172)]  Initializing mermaidAPI (from line # in "")
CONSOLE: [17:38:07 (172)]  Setting conf  gantt - useWidth (from line # in "")
CONSOLE: [17:38:07 (172)]  Setting config: gantt useWidth to 1200 (from line # in "")
CONSOLE: [17:38:07 (174)]  Detected classDiagram syntax (from line # in "")
CONSOLE: [17:38:07 (175)]  {
  "message": "Parse error on line 1:\n%% A Class diagramclassDiagram    Cl\n------------------^\nExpecting 'CLASS_DIAGRAM', got 'NEWLINE'",
  "hash": {
    "text": "\n",
    "token": "NEWLINE",
    "line": 1,
    "loc": {
      "first_line": 1,
      "first_column": 0,
      "last_line": 1,
      "last_column": 0
    },
    "expected": [
      "'CLASS_DIAGRAM'"
    ]
  },
  "line": 49466,
  "sourceURL": "phantomjs://code/mermaid.js",
  "stack": "parseError@phantomjs://code/mermaid.js:49466:49\nparse@phantomjs://code/mermaid.js:49551:36\ndraw@phantomjs://code/mermaid.js:49179:13\nrender@phantomjs:/
/code/mermaid.js:58825:31\nrender@phantomjs://code/mermaid.js:58882:30\n_init@phantomjs://code/mermaid.js:58250:26\nexecuteInPage\n\nglobal code\nevaluateJavaScript@[
native code]\nevaluate@phantomjs://platform/webpage.js:390:39\nphantomjs://code/phantomscript.js:92:29\nforEach@[native code]\nglobal code@phantomjs://code/phantomscr
ipt.js:79:14"
} (from line # in "")
saved png: class_diagram_example.png

@terciodemelo
Copy link

I've done some more research and I found an isolated testable environment, the most popular mermaid container in Docker Hub, which also is not able to correctly render a class diagriam such as:

classDiagram
  Class03 *-- Class04

Resulting in the following image:
class_diagram_example

@odravison
Copy link

Still falling in atom-mermaid plugin.

@aeracode
Copy link

aeracode commented Jan 31, 2017

same issue (6.0.0, 7.0.0) I've downloaded and use js and css on local machine.
os: win 7 64x
browser: chrome

update:
mermaid.forest.css contains required css classes, so diagram works with Forest theme.

@yudenzel
Copy link
Contributor

yudenzel commented Apr 1, 2017

Looks into the src/less/ folder, seems that only forest and neutral contains classDiagram.less.

@yudenzel
Copy link
Contributor

yudenzel commented Apr 1, 2017

The content in src/less/forest/classDiagram.less looks generic.

Could we copy it to src/less/default/ to build the style needed by classDiagram for default theme?

@knsv
Copy link
Collaborator

knsv commented Apr 1, 2017

Good idea!

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Type: New Shape Request for new shape label Jun 29, 2019
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 2.2.16 to 2.2.17.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/v2.2.17/CHANGELOG.md)
- [Commits](tailwindlabs/tailwindcss@v2.2.16...v2.2.17)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Shape Request for new shape
Projects
None yet
Development

No branches or pull requests

6 participants