plugin-autocover
plugin-autocover copied to clipboard
Installation of autocover plugin fails with latest Gitbook 3
$ gitbook install
info: installing 1 plugin using [email protected]
info:
info: installing plugin "autocover"
info: install plugin "autocover" (*) from NPM with version 2.0.1
internal/child_process.js:313
throw errnoException(err, 'spawn');
^
Error: spawn E2BIG
at exports._errnoException (util.js:1036:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:380:9)
at spawn (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/lib/utils/spawn.js:7:13)
at runCmd_ (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/lib/utils/lifecycle.js:237:14)
at runCmd (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/lib/utils/lifecycle.js:196:5)
at runPackageLifecycle (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/lib/utils/lifecycle.js:160:3)
at Array.<anonymous> (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
at LOOP (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
at chain (/Users/pkuczynski/.gitbook/versions/3.2.2/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
And then when running gitbook serve
info: loading plugin "autocover"... ERROR
PluginError: Error with plugin "autocover": Cannot find module '../build/Release/canvas'
anyone has idea how to go on with this issue?
+1
I tried npm install canvas
, then had another error error: uncaughtException: Image or Canvas expected date
+1, same issue PluginError: Error with plugin "autocover": Cannot find module '../build/Release/canvas'
Just got this on MacOS
- CLI version: 2.3.2
- GitBook version: 3.2.3
- [email protected]
After wiping the local node_modules
and reinstalling again it seems as though the plugin just doesn't fire anymore (no cover gets created so assume it fails silently during build).
PluginError: Error with plugin "autocover": libpng16.so.16: cannot open shared object file: No such file or directory
I fix it by modify the package.json
of YOURBOOKDIR/node_modules/gitbook-plugin-autocover
the line:
"canvas": "1.3.15"
to
"canvas-prebuilt": "latest"
and then run npm install
in the gitbook-plugin-autocover
.
Also I have note that on my macOS, the node-gyp rebuild
will use python 3.6.5 which is not supported. You can set node-gyp rebuild --python=python2.7
or npm config set python python2.7
. In case you want to rebuild the original canvas
.
"dependencies": { "canvas-prebuilt": "latest", "canvg": "^0.0.8", "geopattern": "1.2.3", "lodash": "^4.5.0", "q": "^1.4.1" },
{ "_args": [ [ { "name": "gitbook-plugin-autocover", "raw": "[email protected]", "rawSpec": "2.0.1", "scope": null, "spec": "2.0.1", "type": "version" }, "/Users/tim/Documents/Project/Doc.tml.ink" ] ], "_from": "[email protected]", "_id": "[email protected]", "_inCache": true, "_installable": true, "_location": "/gitbook-plugin-autocover", "_nodeVersion": "5.5.0", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", "tmp": "tmp/gitbook-plugin-autocover-2.0.1.tgz_1469727316783_0.8926328683737665" }, "_npmUser": { "email": "[email protected]", "name": "aarono" }, "_npmVersion": "3.10.5", "_phantomChildren": {}, "_requested": { "name": "gitbook-plugin-autocover", "raw": "[email protected]", "rawSpec": "2.0.1", "scope": null, "spec": "2.0.1", "type": "version" }, "_requiredBy": [ "#USER" ], "_resolved": "https://registry.npmjs.org/gitbook-plugin-autocover/-/gitbook-plugin-autocover-2.0.1.tgz", "_shasum": "2e915583cecb2681f447b5fd5625a69281114a99", "_shrinkwrap": null, "_spec": "[email protected]", "_where": "/Users/tim/Documents/Project/Doc.tml.ink", "bugs": { "url": "https://github.com/GitbookIO/plugin-autocover/issues" }, "dependencies": { "canvas-prebuilt": "latest", "canvg": "^0.0.8", "geopattern": "1.2.3", "lodash": "^4.5.0", "q": "^1.4.1" }, "description": "Generate a cover for a gitbook", "devDependencies": { "mocha": "2.3.3" }, "directories": {}, "dist": { "shasum": "2e915583cecb2681f447b5fd5625a69281114a99", "tarball": "https://registry.npmjs.org/gitbook-plugin-autocover/-/gitbook-plugin-autocover-2.0.1.tgz" }, "engines": { "gitbook": ">=3.0.0" }, "gitHead": "e7d74d183f024d504cdb92d0c93dc8a3e0fa4cb9", "homepage": "https://github.com/GitbookIO/plugin-autocover", "license": "Apache-2.0", "main": "./lib/index.js", "maintainers": [ { "email": "[email protected]", "name": "samypesse" }, { "email": "[email protected]", "name": "aarono" } ], "name": "gitbook-plugin-autocover", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git+https://github.com/GitbookIO/plugin-autocover.git" }, "scripts": { "test": "mocha" }, "version": "2.0.1" }