HI, I tried to install this on mac os following the install instructions but yarn gitbook install
failed:
michaelstevens@Michaels-MacBook-Air doc % yarn gitbook install
yarn run v1.22.19
warning package.json: No license field
warning ../package.json: No license field
$ /Users/michaelstevens/doc/node_modules/.bin/gitbook install
Installing GitBook 3.2.3
/Users/michaelstevens/doc/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
if (cb) cb.apply(this, arguments)
^
TypeError: cb.apply is not a function
at /Users/michaelstevens/doc/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
at FSReqCallback.oncomplete (node:fs:191:5)
Node.js v19.3.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I tested node 18 to see if it made a difference:
michaelstevens@Michaels-MacBook-Air doc % yarn gitbook install
yarn run v1.22.19
warning package.json: No license field
warning ../package.json: No license field
$ /Users/michaelstevens/doc/node_modules/.bin/gitbook install
Installing GitBook 3.2.3
/Users/michaelstevens/doc/node_modules/npm/node_modules/graceful-fs/polyfills.js:287
if (cb) cb.apply(this, arguments)
^
TypeError: cb.apply is not a function
at /Users/michaelstevens/doc/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
at FSReqCallback.oncomplete (node:fs:208:5)
Node.js v18.12.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
gitbook-cli looked abandoned so I managed to get something generating with this diff:
diff --git a/book.json b/book.json
index 6f6098a..843a696 100644
--- a/book.json
+++ b/book.json
@@ -2,7 +2,6 @@
"plugins": [
"edit-link",
"toggle-chapters",
- "page-toc",
"-sharing",
"versions",
"hints",
diff --git a/package.json b/package.json
index 4ce3c73..6d9efb0 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,11 @@
{
"dependencies": {
- "gitbook-cli": "^2.3.2"
+ "gitbook-plugin-edit-link": "^2.0.2",
+ "gitbook-plugin-hints": "^1.0.2",
+ "gitbook-plugin-localized-footer": "^0.3.1",
+ "gitbook-plugin-page-toc": "^1.1.1",
+ "gitbook-plugin-toggle-chapters": "^0.0.3",
+ "gitbook-plugin-versions": "^2.1.4",
+ "honkit": "^4.0.4"
}
}
(note it becomes yarn honkit serve
to run a local server)
but I do get a bunch of warnings so not totally happy with it.