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

launch gitbook throw err "Error: Could not locate the bindings file. " #23

Open
ghost opened this issue Jun 15, 2016 · 2 comments
Open

Comments

@ghost
Copy link

ghost commented Jun 15, 2016

There is some problem after i install gitbook-plugin-mermaid.
How can i resolve this err?

Here is the Content of README.md:

# Introduction

{% mermaid %}

{% endmermaid%}

here is load log:

info: loading book configuration....OK 
info: load plugin gitbook-plugin-mermaid ....OK 
info: load plugin gitbook-plugin-katex ....OK 
info: load plugin gitbook-plugin-puml ....OK 
info: load plugin gitbook-plugin-todo ....OK 
info: load plugin gitbook-plugin-highlight ....OK 
info: load plugin gitbook-plugin-search ....OK 
info: load plugin gitbook-plugin-sharing ....OK 
info: load plugin gitbook-plugin-fontsettings ....OK 
info: load plugin gitbook-plugin-livereload ....OK 
info: >> 9 plugins loaded 
/Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/node_modules/bindings/bindings.js:91
  throw err
  ^

Error: Could not locate the bindings file. Tried:
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/build/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/build/Debug/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/build/Release/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/out/Debug/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/Debug/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/out/Release/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/Release/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/build/default/weakref.node
 → /Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/compiled/6.2.1/darwin/x64/weakref.node
    at bindings (/Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/node_modules/bindings/bindings.js:88:9)
    at Object.<anonymous> (/Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak/lib/weak.js:7:35)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at new D (/Users/iyuqi/Work/Indugration/gitbooks/org.omg/uml/node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/index.js:28:20)
@JozoVilcek
Copy link
Owner

Sorry, I can not reproduce this. In my example, plugin works for me. Maybe it will help to compare with your setup:
https://github.com/JozoVilcek/gitbook-example

@JasonGao180
Copy link

JasonGao180 commented Jun 25, 2016

@iyuqi I got the same error, and have a workaround to solve it.
The error message says that it can not find the weakref.node, so decide to build it manually

npm install -g node-gyp
cd my-gitbook-doc-folder
cd node_modules/gitbook-plugin-mermaid/node_modules/phantom/node_modules/dnode/node_modules/weak
node-gyp configure
node-gyp build

now the plugin will work perfectly.

@JozoVilcek thanks for your great plugin. do you have idea about why missing weakref.node

(english is foreign language for me)

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

2 participants