Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error when trying to use Ember with Handlebars (runtime-only) #1303

ermakovich opened this Issue · 8 comments

5 participants


Ember: 1.0.pre
Handlebars: runtime-1.0.0.beta.6

An exception is thrown when Ember tries to access Handlebars.Compiler.prototype property:

TypeError: Cannot read property 'prototype' of undefined.

Is it possible to make Ember to work with Handlebars (runtime-only)? Is it a supported scenario?


There is one issue preventing Ember from working with runtime-only Handlebars at the moment. Ember.Select has a defaultTemplate that is inline handlebars. If you comment out that line, you can use Handlebars (runtime-only).


Thanks a lot!
Any ideas how to make known Ember's helpers work? When I use action helper for example, I get the following error:

Error: Could not find property 'action'


@ermakovich that's unrelated to this ticket and probably a good question to ask on stack overflow with a code example / jsfiddle.

@ermakovich ermakovich closed this

Does ember.js support handlebars runtime now?


The Ember.Select issue still prevents runtime-only Handlebars from working with Ember out of the box.

We are currently precompiling our templates and using the following hack (loaded before Ember):

// Ember currently tries to compile a Handlebars template for Ember.Select,
// which is the last remaining blocker to just using the Handlebars runtime
// in production. To avoid that blowing up, we are stubbing out the required
// compilation-related functions so that Ember can load without error.

Handlebars.Compiler = function(){};
Handlebars.Compiler.prototype.compile = function () {
Handlebars.JavaScriptCompiler = function(){};
Handlebars.JavaScriptCompiler.prototype.compile = function () {
Handlebars.parse = function(){};
Handlebars.compile = function(){};
@lukemelia lukemelia reopened this

We really should have a precompile phase of the dist task. There's no reason to ship built-in templates as a string.


I moved precompilation earlier in #1660


Closing in favor of discussion on #1660.

@wagenet wagenet closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.