遇到问题如下:
[root@instance-t08e7g6z mybook]# gitbook init
/usr/local/lib/node_modules/gitbook-cli/node_modules/fs-extra/lib/index.js:3
const assign = require(’./util/assign’)
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/gitbook-cli/lib/config.js:2:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
然后向上找看到gitbook安装处有WARN如下:
[root@instance-t08e7g6z node-v0.10.30]# npm install -g gitbook-cli
npm WARN engine universalify@0.1.2: wanted: {“node”:">= 4.0.0"} (current: {“node”:“0.10.30”,“npm”:“1.4.21”})