Giter Club home page Giter Club logo

Comments (5)

saintshaga avatar saintshaga commented on August 16, 2024 1

@JozoVilcek

Thank you so much for the reply.

did you manage to get it work?

Not yet

Does install of plugins helped?

I have installed using gitbook install

It works fine in my demo example

I tried your demo with following steps:

  1. clone the example project to my local place;
  2. go to src/book;
  3. run gitbook install
  4. run gitbook serve

The same error happens:

phantom stdout: ReferenceError: Can't find variable: mermaid


phantom stdout:   c:%5CUsers%5CHuangFeng%5Cworkspace%5Cgitbook-example%5Csrc%5Cb
ook%5Cnode_modules%5Cgitbook-plugin-mermaid%5Cconvert%5Cconverter.html:10
ReferenceError: Can't find variable: mermaid

  c:%5CUsers%5CHuangFeng%5Cworkspace%5Cgitbook-example%5Csrc%5Cbook%5Cnode_modul
es%5Cgitbook-plugin-mermaid%5Cconvert%5Cconverter.html:34 in renderToSvg
  phantomjs://webpage.evaluate():2
  phantomjs://webpage.evaluate():3
  phantomjs://webpage.evaluate():3

Then I edit gitbook-example\src\book\node_modules\gitbook-plugin-mermaid\convert\converter.html#line4: I copy content of mermaid.min.js into this html, and save.

Run gitbook serve again, it works now.

I guess it is some fault of phantom, which can not load mermaid.min.js in my environment. Can you help find a solution? Or do you know how to debug and find out why phantom can not load mermaid.min.js into converter.html correctly?

PS: I am using win7 64bit

from gitbook-plugin-mermaid.

FrenchBen avatar FrenchBen commented on August 16, 2024

you're probably forgetting to install the plugins:
gitbook install ./

from gitbook-plugin-mermaid.

JozoVilcek avatar JozoVilcek commented on August 16, 2024

@saintshaga did you manage to get it work? Does install of plugins helped? It works fine in my demo example

from gitbook-plugin-mermaid.

saintshaga avatar saintshaga commented on August 16, 2024

@FrenchBen I had installed the plugins with gitbook install

from gitbook-plugin-mermaid.

JozoVilcek avatar JozoVilcek commented on August 16, 2024

I have never used this on windows, which does not have :/
I have published new version of a plugin, which does include #12. Maybe problem of white spaces in path to the phantomjs affects you as well.

from gitbook-plugin-mermaid.

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.