gitbook-cli
gitbook-cli copied to clipboard
E2BIG when trying to install mathjax plugin
running a gitbook install ./ on a OS X 10.8.5 machine, npm 2.12.1, gitbook 0.3.4 (global install through homebrew), using the book.json:
{
"gitbook": ">=2.0.0",
"plugins": ["mathjax"]
}
I get the following error:
gitbook install ./
info: 1 plugins to install
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/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/lib/utils/spawn.js:7:13)
at runCmd_ (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/lib/utils/lifecycle.js:207:14)
at runCmd (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/lib/utils/lifecycle.js:172:5)
at runPackageLifecycle (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/lib/utils/lifecycle.js:134:3)
at Array.<anonymous> (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
at LOOP (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
at chain (/Users/pcmehlitz/.gitbook/versions/2.1.0/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
I also tried to install the plugin globally with npm install gitbook-plugin-mathjax, and while this succeeds it doesn't get picked up by gitbook
Same happens to me. Looks like it happens when plugin requires "npm build" native C++ addons.
npm rebuild for native c++ addons works for me, but it looks weired.