Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on mac os #165

Open
mstevens opened this issue Dec 22, 2022 · 3 comments
Open

Unable to install on mac os #165

mstevens opened this issue Dec 22, 2022 · 3 comments

Comments

@mstevens
Copy link

mstevens commented Dec 22, 2022

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.

@j0k3r
Copy link
Member

j0k3r commented Dec 22, 2022

We know gitbook is abandoned.
The build to deploy the doc is using node v10.24.1. Give a try maybe

@mstevens
Copy link
Author

It's difficult to find a node that old! But yes it did work when I found one.

@mstevens
Copy link
Author

Did a better version of the change to use honkit on a fork: f4c614c

Looks (nearly) identical to me and works in current node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants