Skip to content

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

Description

@belgoros

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions