litten / BlogBackup

博客备份

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

maobaolong opened this issue · comments

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

怎么生成主页文章?

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

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

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

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

➜ blog git:(master) ✗ npm i hexo-generator-json-content --save
hexo-generator-json-content@3.0.1 node_modules/hexo-generator-json-content
├── moment@2.19.1
├── keyword-extractor@0.0.14 (underscore@1.7.0, underscore.string@2.3.3)
└── hexo-util@0.6.2 (html-entities@1.2.1, striptags@2.2.1, bluebird@3.5.1, camel-case@3.0.0, highlight.js@9.12.0, cross-spawn@4.0.2)

➜ 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

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

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