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

macOS 10.15.6: gitbook help railse "ReferenceError: primordials is not defined" #111

Open
belgoros opened this issue Aug 6, 2020 · 1 comment

Comments

@belgoros
Copy link

belgoros commented Aug 6, 2020

I just installed gitbook-cli as explained in the README:

npm install -g gitbook-cli
/usr/local/bin/gitbook -> /usr/local/lib/node_modules/gitbook-cli/bin/gitbook.js
+ gitbook-cli@2.3.2
updated 3 packages in 4.685s

When checking it with gitbook help, it raised the error:

gitbook help
Error loading version latest: ReferenceError: primordials is not defined
    at evalmachine.<anonymous>:35:5
    at Object.<anonymous> (/Users/serguei/.gitbook/versions/2.6.9/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1040:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/serguei/.gitbook/versions/2.6.9/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)

TypeError: Cannot read property 'commands' of null

When checking the version, here is what is displayed:

gitbook -V
CLI version: 2.3.2
GitBook version: 2.6.9

Running gitbook serve raises the same error as above.
Same for gitbook init.

Node versions:

node -v => v13.8.0
npm -v => 6.14.7

What's wrong with that?

@fangykai
Copy link

fangykai commented Aug 16, 2022

Have the same issue to this day, running on Linux Mint 20.3

    at evalmachine.<anonymous>:47:5
    at Object.<anonymous> (/home/kai/.gitbook/versions/2.6.9/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
    at Module.load (node:internal/modules/cjs/loader:998:32)
    at Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1022:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/kai/.gitbook/versions/2.6.9/node_modules/graceful-fs/graceful-fs.js:3:27)
    at Module._compile (node:internal/modules/cjs/loader:1120:14)

TypeError: Cannot read properties of null (reading 'commands')

Giitbook Info

CLI Vers: 2.3.2
GitBook Vers: 2.6.9```


Node Info
```node -v: v18.7.0
npm -v: 8.17.0```

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