BlogBackup icon indicating copy to clipboard operation
BlogBackup copied to clipboard

缺失模块,博客目录执行了npm i hexo-generator-json-content --save,不好使

Open maobaolong opened this issue 9 years ago • 11 comments

maobaolong avatar Jan 20 '17 07:01 maobaolong

可能是nodejs版本太低了,最好升级到6.x吧

jiahao42 avatar Mar 01 '17 14:03 jiahao42

怎么生成主页文章?

XWHQSJ avatar Mar 27 '17 11:03 XWHQSJ

执行了npm i hexo-generator-json-content --save,还是无法生成博客所有文章

XWHQSJ avatar Mar 27 '17 11:03 XWHQSJ

我的也是!还是无法生成所有文章

lecochao avatar May 15 '17 07:05 lecochao

在根路径(博客的路径,不是主题路径)的 _config.yml文件中将jsonContent的相关内容加上,或者参考作者博客备份的根路径_config.yml文件。

licuix avatar Jul 14 '17 08:07 licuix

是在根目录执行的npm i hexo-generator-json-content --save 也配置了,还是没有生成 所有文章

RoshanGH avatar Nov 09 '17 09:11 RoshanGH

➜ blog git:(master) ✗ npm i hexo-generator-json-content --save [email protected] node_modules/hexo-generator-json-content ├── [email protected] ├── [email protected] ([email protected], [email protected]) └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

RoshanGH avatar Nov 09 '17 09:11 RoshanGH

➜ blog git:(master) ✗ hexo generate ERROR Plugin load failed: hexo-generator-json-content SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode at Object.exports.runInThisContext (vm.js:53:16) at /Users/roshan/www/bbc56/github/blog/node_modules/hexo/lib/hexo/index.js:227:17 at tryCatcher (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:504:31) at Promise._settlePromise (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:561:18) at Promise._settlePromise0 (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:606:10) at Promise._settlePromises (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:685:18) at Promise._fulfill (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:630:18) at Promise._resolveCallback (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:425:57) at Promise._settlePromiseFromHandler (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:516:17) at Promise._settlePromise (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:561:18) at Promise._settlePromise0 (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:606:10) at Promise._settlePromises (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:685:18) at Promise._fulfill (/Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:630:18) at /Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/bluebird/js/release/nodeback.js:42:21 at /Users/roshan/www/bbc56/github/blog/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:78:16 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3) INFO Start processing INFO Files loaded in 897 ms INFO 0 files generated in 703 ms

RoshanGH avatar Nov 09 '17 09:11 RoshanGH

blog git:(master) ✗ brew info node node: stable 8.9.1 (bottled), HEAD Platform built on V8 to build network applications https://nodejs.org/ Not installed From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/node.rb ==> Dependencies Build: pkg-config ✔ Recommended: icu4c ✘ Optional: openssl ✘ ==> Options --with-debug Build with debugger hooks --with-openssl Build against Homebrew's OpenSSL instead of the bundled OpenSSL --without-completion npm bash completion will not be installed --without-icu4c Build with small-icu (English only) instead of system-icu (all locales) --without-npm npm will not be installed --HEAD Install HEAD version

RoshanGH avatar Nov 09 '17 09:11 RoshanGH

求解

RoshanGH avatar Nov 09 '17 09:11 RoshanGH

我一开始也是这样,你用管理员身份进入doc模式,然后在进行安装

caozhengbo avatar Oct 08 '18 09:10 caozhengbo