foundation / panini

A super simple flat file generator.
Other
592 stars 104 forks source link

Error when loading [...].js as a Handlebars helper; Error: Missing helper #245

Closed MaxLeven closed 1 year ago

MaxLeven commented 1 year ago

Hi.

I am getting an error when trying to add any helper. I was using panini before, with Foundation (install with Foundation CLI) and all my helpers work fine. But this time I install it manually and it is not working.

Error when loading bold.js as a Handlebars helper.
Error when loading realIndex.js as a Handlebars helper.
[14:09:17] 'pages' errored after 412 ms
[14:09:17] Error: Panini: rendering error occured.
Error: realIndex doesn't match repeat - 24:16
    at Panini.render ([...]panini-issue/node_modules/panini/lib/render.js:80:11)
    at DestroyableTransform.Transform._read ([...]panini-issue/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write ([...]panini-issue/node_modules/readable-stream/lib/_stream_transform.js:172:83)
    at doWrite ([...]panini-issue/node_modules/readable-stream/lib/_stream_writable.js:428:64)
    at writeOrBuffer ([...]panini-issue/node_modules/readable-stream/lib/_stream_writable.js:417:5)
    at DestroyableTransform.Writable.write ([...]panini-issue/node_modules/readable-stream/lib/_stream_writable.js:334:11)
    at DestroyableTransform.ondata ([...]panini-issue/node_modules/readable-stream/lib/_stream_readable.js:619:20)
    at DestroyableTransform.emit (node:events:527:28)
    at DestroyableTransform.emit (node:domain:537:15)
    at addChunk ([...]panini-issue/node_modules/readable-stream/lib/_stream_readable.js:291:12)

I doubled check configuration and install all requirements.


Node v16.15.1 NPM 8.15.0

Dependencies:


I create a demo repository

Panini is a great library and I use it in most projects. Hope this issue can be fixed ASAP.

maxmakong commented 1 year ago

Unfortunately, the same problem applies to most of our projects. Help please!

MaxLeven commented 1 year ago
rtt63 commented 7 months ago

Didn't work out for me, there was no type module and I tried to add commonjs there intentionally