SlexAxton / require-handlebars-plugin

A plugin for handlebars in require.js (both in dev and build)
804 stars 202 forks source link

Cannot call method 'registerHelper' of undefined #221

Open dietherw opened 9 years ago

dietherw commented 9 years ago

After upgrading from version 0.4.0 to 0.11.2 I get the following error when building with require:

Running "requirejs:dist" (requirejs) task
TypeError: Cannot call method 'registerHelper' of undefined
In module tree:
main
  core/core
    hbs

{ [Error: TypeError: Cannot call method 'registerHelper' of undefined
In module tree:
main
  core/core
    hbs

This is in my require paths:

    handlebars: '../bower_components/require-handlebars-plugin/hbs/handlebars',
    hbs: '../bower_components/require-handlebars-plugin/hbs',

My map config:

 map: {
    '*': {
        'hbs/underscore': 'underscore',
        'hbs/handlebars': 'handlebars',
        'Handlebars': 'handlebars'
    }
},

I already played with different paths, maps, but I'm always getting errors. Anybody has any idea how I should configure this with the latest version?

flamedmg commented 9 years ago

I'm having same issue right now. I was able to fix it by removing the following line:

handlebars: '../bower_components/require-handlebars-plugin/hbs/handlebars',

Now build goes fine, but i have trouble with helper registgratoin