GitbookIO / gitbook-cli

GitBook's command line interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to install dependencies of gitbook version

rqc opened this issue · comments

Hi,

When I install a new version or use the default one when I issue gitbook build . it fails with an error. For version 3.2.2 I get this error:

Error loading version latest: Error: Cannot find module 'extend'Installed
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/.gitbook/versions/3.2.2/lib/index.js:1:76)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)

TypeError: Cannot read property 'commands' of null
error Command failed with exit code 1.

I noticed that you don't version gitbook-cli but rather install gitbook api versions under $HOME/.gitbook/versions/<ver>. When I looked there, it didn't have a node_modules in it. I ran npm install and after that, the gitbook build . command worked.

Any ideas on why the installation is not running npm install when a new version is installed?

Thanks!

refer to #68