docpad/docpad-plugin-paged

TypeError: undefined is not a function

roelWuyts opened this issue · 0 comments

Hello,
I recently started using DocPad (and am new to the whole JavaScript/CoffeeScript ecosystem, npm, ...) and was looking for a pager when I found your plugin that would do exactly as needed.
However when I try to use it for paging a lists of posts (using the exact same code as in the "Paging a Collection Listing" and using the 'posts' collections as indicated higher up on your excellent information page) I run into trouble (see below). I tried to poke around a bit but couldn't find the problem (which may very well be a newbie problem).

info: Generating...
info: Adding pages for 1 documents...
info: Creating page 1 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/2/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.1.html
info: Creating page 2 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/3/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.2.html
info: Creating page 3 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/4/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.3.html
info: Creating page 4 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/5/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.4.html
info: Creating page 5 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/6/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.5.html
info: Creating page 6 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/7/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.6.html
info: Creating page 7 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/8/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.7.html
info: Creating page 8 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/9/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.8.html
info: Creating page 9 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/10/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.9.html
info: Creating page 10 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/11/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.10.html
info: Creating page 11 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/12/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.11.html
info: Creating page 12 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/13/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.12.html
info: Creating page 13 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/14/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.13.html
info: Creating page 14 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/15/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.14.html
info: Creating page 15 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/16/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.15.html
info: Creating page 16 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/17/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.16.html
info: Creating page 17 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/18/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.17.html
info: Creating page 18 for /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco at newsPaged/19/index.html.md.eco
info: Created secondary url structure for index.html at /newsPaged.18.html
info: Added pages
error: Something went wrong while rendering: /Users/wuytsr/Sites/exascience/src/render/newsPaged.html.md.eco
The error follows:

TypeError: undefined is not a function
at Object.eval (:47:10)
at Object.eval (:117:8)
at eval (:119:6)
at Function.eco.render (/Users/wuytsr/Sites/exascience/node_modules/docpad-plugin-eco/node_modules/eco/lib/index.js:26:25)
at EcoPlugin.render (/Users/wuytsr/Sites/exascience/node_modules/docpad-plugin-eco/out/eco.plugin.js:23:32)
at ambi (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:57:27)
at Task. (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/event-emitter-grouped/out/lib/event-emitter-grouped.js:45:23)
at ambi (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:55:18)
at Domain.fireMethod (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:385:23)
at Domain.run (domain.js:197:16)
at Task.fire (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:423:27)
at Immediate._onImmediate (/Users/wuytsr/Sites/exascience/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:440:26)
at processImmediate as _immediateCallback

To report the above, follow the guide at: http://docpad.org/bug-report