Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MaxLeven opened this issue Oct 5, 2022 · 3 comments
Closed

Comments

@MaxLeven
Copy link

MaxLeven commented Oct 5, 2022

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:

  • @babel/core: ^7.19.3
  • @babel/preset-env: ^7.19.3
  • @babel/register: ^7.18.9
  • babel-core: ^6.26.3
  • babel-loader: ^8.2.5
  • babel-register: ^6.26.0
  • gulp: ^4.0.2
  • gulp-babel: ^8.0.0
  • gulp-cli: ^2.3.0
  • panini: ^1.7.2

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
Copy link

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

@MaxLeven
Copy link
Author

MaxLeven commented Oct 5, 2022

  • Fixed this issue by removing "type": "module", from package.json

@MaxLeven MaxLeven closed this as completed Oct 5, 2022
@rtt63
Copy link

rtt63 commented Feb 19, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants