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

mindmap generation failed #137

Open
alvin-xu opened this issue Oct 13, 2024 · 0 comments
Open

mindmap generation failed #137

alvin-xu opened this issue Oct 13, 2024 · 0 comments

Comments

@alvin-xu
Copy link

Try to generate the mindmap by the api, but failed. can anyone knows the reason of syntax issue or others ?

curl --location --request POST 'http://127.0.0.1:80/generate?type=png' \
--header 'Content-Type: text/plain' \
--output tmp.png \
--data-raw '
mindmap
  root((mindmap))
    Origins
      Long history
      ::icon(fa fa-book)
      Popularisation
        British popular psychology author Tony Buzan
    Research
      On effectivness<br/>and features
      On Automatic creation
        Uses
            Creative techniques
            Strategic planning
            Argument mapping
    Tools
      Pen and paper
      Mermaid
'
2024/10/13 02:14:03 [500] could not generate diagram: cachingGenerater.generate failed: failed when executing mermaid: exit status 1: Generating single mermaid chart
: 
Error: Evaluation failed: Error: Parse error on line 1:
mindmap  root((mind
^
Expecting 'open_directive', 'NEWLINE', 'SPACE', 'GRAPH', got 'ALPHA'
    at pptr://__puppeteer_evaluation_script__:13:17
    at ExecutionContext._ExecutionContext_evaluate (file:///root/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:225:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (file:///root/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:104:16)
    at async ElementHandle.evaluate (file:///root/node_modules/puppeteer-core/lib/esm/puppeteer/common/JSHandle.js:86:16)
    at async ElementHandle.$eval (file:///root/node_modules/puppeteer-core/lib/esm/puppeteer/common/ElementHandle.js:138:24)
    at async renderMermaid (file:///root/node_modules/@mermaid-js/mermaid-cli/src/index.js:197:22)
    at async parseMMD (file:///root/node_modules/@mermaid-js/mermaid-cli/src/index.js:172:20)
    at async run (file:///root/node_modules/@mermaid-js/mermaid-cli/src/index.js:403:20)
    at async cli (file:///root/node_modules/@mermaid-js/mermaid-cli/src/index.js:138:3)
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

1 participant