Search code examples
ember.jsember-dataember-clihandlebars.jshtmlbars

How to replace the handlebars with htmlbars in Ember CLI app?


I am facing the following issue after upgrading the Ember and Ember data to the canary versions.

Cannot set property 'compilerInfo' of undefined

I found the discussion about the issue in Ember CLI repo.

https://github.com/ember-cli/ember-cli/issues/2955

The solution is to replace handlebars with htmlbars. But I don't know the exact steps to do that.

I checked handlebars repo. It gives code snippets but I don't know where to place the code exactly.

Any idea?


Solution

  • You will still be using Handlebars, but you need 2.0.

    For HTMLBars, what you'll change is the template compiler.

    npm uninstall --save-dev broccoli-ember-hbs-template-compiler
    npm install --save-dev ember-cli-htmlbars
    rm -rf bower_components
    bower install --save handlebars#2.0.0
    bower install