GitbookIO / plugin-mathjax

MathJAX plugin for GitBook
Apache License 2.0
89 stars 51 forks source link

Troubles with Mac Os #11

Open vhuber opened 8 years ago

vhuber commented 8 years ago

I do not success on installing this plugin on my mac. My book compile well on gitbook and on an ubuntu. I have followed this tuto, with nmp installed thanks to brew.

vhuber@host% gitbook install
info: 8 plugins to install
info: No version specified, resolve plugin anchors
info: install plugin anchors from npm (gitbook-plugin-anchors) with version 0.4.0
gitbook-plugin-anchors@0.4.0 node_modules/gitbook-plugin-anchors
├── underscore@1.8.3
└── cheerio@0.19.0 (entities@1.1.1, dom-serializer@0.1.0, css-select@1.0.0, htmlparser2@3.8.3, lodash@3.10.1)
info: >> plugin anchors installed with success
info: No version specified, resolve plugin include-highlight
info: install plugin include-highlight from npm (gitbook-plugin-include-highlight) with version 0.1.0
gitbook-plugin-include-highlight@0.1.0 node_modules/gitbook-plugin-include-highlight
├── fs@0.0.2
├── path@0.11.14
└── q@1.4.1
info: >> plugin include-highlight installed with success
info: No version specified, resolve plugin mathjax
info: install plugin mathjax from npm (gitbook-plugin-mathjax) with version 1.0.0
child_process.js:1162
    throw errnoException(err, 'spawn');
          ^
Error: spawn E2BIG
    at exports._errnoException (util.js:746:11)
    at ChildProcess.spawn (child_process.js:1162:11)
    at exports.spawn (child_process.js:995:9)
    at spawn (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/lib/utils/spawn.js:7:13)
    at runCmd_ (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/lib/utils/lifecycle.js:207:14)
    at runCmd (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/lib/utils/lifecycle.js:172:5)
    at runPackageLifecycle (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/lib/utils/lifecycle.js:134:3)
    at Array.<anonymous> (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
    at LOOP (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
    at chain (/Users/vhuber/.gitbook/versions/2.2.0/node_modules/npm/node_modules/slide/lib/chain.js:20:5)

and my book.json

{
    "gitbook": "2.2.0",
    "plugins": ["anchors","include-highlight","mathjax","ga","richquotes","toc","expandable-chapters","unicodecss"],
    "pluginsConfig": {
        "ga": {
            "token": "UA-65761593-1"
        },
        "richquotes" : {
            "todos" : true,
            "fixme" : true
        }
    },
    "links": {
        "sidebar": {
            "Feel++": "http://www.feelpp.org/",
            "GitHub": "http://www.github.com/feelpp/feelpp"
        }
    }
}
benanders commented 8 years ago

Was anyone able to resolve this issue? A quick fix or hack or something? I'm getting this error and I need to use something to typeset math formula in Gitbook, and so far this plugin fails to install.

lightscalar commented 8 years ago

I'm having the same issue. Cannot install MathJax on MAC OSX.

benanders commented 8 years ago

I found if you use the beta version then it works fine on OSX. You use the term mathjax-beta instead of mathjax in your book.json. Not sure why the beta version works and the main release doesn't.

soulmachine commented 8 years ago

@GravityScore your way works only in gitbook install stage, when I run gitbook build it will still throw out an error:

Error: Error loading plugins: gitbook-plugin-mathjax-beta.
mstn commented 8 years ago

+1

GuGuss commented 7 years ago

Related to https://github.com/GitbookIO/gitbook-cli/issues/11