gitbook icon indicating copy to clipboard operation
gitbook copied to clipboard

error in using gitbook init

Open shotolee opened this issue 8 years ago • 6 comments

I install the lastest gitbook version: 3.2.2, and use gitbook init was Error:

gitbook init Error loading version latest: Error: Cannot find module 'npmlog' at Function.Module._resolveFilename (module.js:555:15) at Function.Module._load (module.js:482:25) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Object. (/Users/shotolee/node_modules/npm/lib/utils/umask.js:2:14) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3)

TypeError: Cannot read property 'commands' of null

My node and npm version is:

node -v v9.5.0 pm -v 5.6.0

shotolee avatar Feb 06 '18 14:02 shotolee

cd ~/.gitbook/versions/3.2.2 && npm i It worked

shotolee avatar Feb 07 '18 02:02 shotolee

same,did you solve it?

qing-ke avatar Apr 03 '18 09:04 qing-ke

@qing-ke which version of Gitbook do you use?

ghost avatar Apr 03 '18 18:04 ghost

cli version 2.3.2 gitbook version 3.2.3 958283323 邮箱:[email protected] 签名由 网易邮箱大师 定制 在2018年04月04日 02:36,Norbert Fuhs 写道: @qing-ke which version of Gitbook do you use? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

qing-ke avatar Apr 04 '18 00:04 qing-ke

I 've solved the problem,it could be caused by file privileges,thanks 958283323 邮箱:[email protected] 签名由 网易邮箱大师 定制 在2018年04月04日 08:55,[email protected] 写道: cli  version   2.3.2 gitbook  version  3.2.3 958283323 邮箱:[email protected] 签名由 网易邮箱大师 定制 在2018年04月04日 02:36,Norbert Fuhs 写道: @qing-ke which version of Gitbook do you use? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

qing-ke avatar Apr 04 '18 05:04 qing-ke

Glad to hear you solved the issue!

ghost avatar Apr 04 '18 10:04 ghost