Nunjucks Error: [Line 7, Column 96] unexpected token: %}

I recently brought some wordpress posts over (around 2700 of them to be exact) using the hexo migrate wordpress function and now when I try to run hexo serve it’s throwing the following error, I’m not sure how to troubleshoot this as I’m new to Hexo.

INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Nunjucks Error:  [Line 7, Column 96] unexpected token: %}
    =====               Context Dump               =====
    === (line number probably different from source) ===
  2 | <ul>
  3 | <li>Fixed a bug where editing pages with primary keys greater than 999 would throw an exception.</li>
  4 | <li>Fixed a <code>MultipleObjectsReturned</code> exception raised on the page types migration with multiple page types per site.</li>
  5 | <li>Fixed a bug which prevented toolbar js from working correctly when rendered before toolbar.</li>
  6 | <li>Fixed a bug where CMS would incorrectly highlight plugin content when plugin contains invisible elements</li>
  7 | <li>Fixed a regression where templates which inherit from a template using an <code>{% extends %}</code> tag with a default would raise an exception.</li>
  8 | </ul>
  9 | <p>Full release notes here: <a href="https://www.django-cms.org/en/blog/2018/03/06/django-cms-3-5-1-released/">https://www.django-cms.org/en/blog/2018/03/06/django-cms-3-5-1-released/</a></p>
  10 |
    =====             Context Dump Ends            =====
    at formatNunjucksError (C:\Users\cmscr\Documents\cms-critic\node_modules\hexo\lib\extend\tag.js:99:13)
    at C:\Users\cmscr\Documents\cms-critic\node_modules\hexo\lib\extend\tag.js:121:34
    at tryCatcher (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\promise.js:725:18)
    at _drainQueueStep (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\async.js:93:12)
    at _drainQueue (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\cmscr\Documents\cms-critic\node_modules\bluebird\js\release\async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

Hi there,

This is the Hugo community forum, you may have better luck asking the Hexo folks.

2 Likes