bubkoo / hexo-toc

📖 Insert a markdown TOC before posts be rendered.
MIT License
127 stars 17 forks source link

clean error #14

Closed gongroc closed 7 years ago

gongroc commented 8 years ago
        $title.prepend(`<a href='#${id}' class='${anchorOpts.style}'>${anc
                       ^

ERROR Plugin load failed: hexo-toc SyntaxError: Unexpected token ILLEGAL 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 (/opt/blog/node_modules/hexo/lib/hexo/index.js:213:21) at /opt/blog/node_modules/hexo-toc/index.js:4:15 at /opt/blog/node_modules/hexo/lib/hexo/index.js:229:12 at tryCatcher (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:510:31) at Promise._settlePromise (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:567:18) at Promise._settlePromise0 (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:612:10) at Promise._settlePromises (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:691:18) at Promise._fulfill (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:636:18) at Promise._resolveCallback (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:431:57) at Promise._settlePromiseFromHandler (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:522:17) at Promise._settlePromise (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:567:18) at Promise._settlePromise0 (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:612:10) at Promise._settlePromises (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:691:18) at Promise._fulfill (/opt/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:636:18) at /opt/blog/node_modules/hexo/node_modules/bluebird/js/release/nodeback.js:42:21 at /opt/blog/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:78:16 at fs.js:268:14 at /opt/blog/node_modules/hexo/node_modules/nunjucks/node_modules/chokidar/node_modules/readdirp/node_modules/graceful-fs/graceful-fs.js:43:10 at /opt/blog/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:43:10 at /opt/blog/node_modules/hexo/node_modules/warehouse/node_modules/graceful-fs/graceful-fs.js:43:10 at /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:43:10 at Object.oncomplete (fs.js:107:15)

tea3 commented 8 years ago

@gongroc Probably , you need to upgrade Node to at least 4.0 (the current stable).

bubkoo commented 7 years ago

@gongroc npm install hexo-toc@1.0.8