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

Unable to import handlebars-helpers #63

Open
ProfessorManhattan opened this issue Sep 14, 2021 · 1 comment
Open

Unable to import handlebars-helpers #63

ProfessorManhattan opened this issue Sep 14, 2021 · 1 comment

Comments

@ProfessorManhattan
Copy link

When I run hbs --helper handlebars-helpers I get the following issue:

WARNING: /home/hawkwood/androidstudio/node_modules/handlebars-helpers/index.js does not export a 'register' function, cannot import
Error: Missing helper: "eq"

Any idea on how I can import all of the handlebars-helpers functions with this?

@keithamus
Copy link
Owner

keithamus commented Sep 15, 2021

You would have to make a file that registers them, for example:

//handlebars-helpers.js
module.exports.register = function (Handlebars) {
  require('handlebars-helpers')(Handlebars)
}

Then run with that file instead:

hbs --helper ./handlebars-helpers.js

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

2 participants