plugin-autocover icon indicating copy to clipboard operation
plugin-autocover copied to clipboard

Installation of autocover plugin fails with latest Gitbook 3

Open pkuczynski opened this issue 8 years ago • 9 comments

$ 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'

pkuczynski avatar Feb 02 '17 13:02 pkuczynski

anyone has idea how to go on with this issue?

php-cpm avatar Apr 06 '17 15:04 php-cpm

+1

hiyangguo avatar May 11 '17 02:05 hiyangguo

I tried npm install canvas, then had another error error: uncaughtException: Image or Canvas expected date

moshanATucsd avatar Aug 06 '17 03:08 moshanATucsd

+1, same issue PluginError: Error with plugin "autocover": Cannot find module '../build/Release/canvas'

linrongbin16 avatar Oct 05 '17 15:10 linrongbin16

Just got this on MacOS

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).

darth-veitcher avatar Dec 28 '17 16:12 darth-veitcher

PluginError: Error with plugin "autocover": libpng16.so.16: cannot open shared object file: No such file or directory

greysoftcrazy avatar Jan 19 '18 07:01 greysoftcrazy

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.

vanabel avatar May 01 '18 06:05 vanabel

"dependencies": { "canvas-prebuilt": "latest", "canvg": "^0.0.8", "geopattern": "1.2.3", "lodash": "^4.5.0", "q": "^1.4.1" },

NeoTim avatar Sep 15 '18 04:09 NeoTim

{ "_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" }

NeoTim avatar Sep 15 '18 04:09 NeoTim