Error no detectado: la plantilla se precompiló con una versión anterior de Handlebars

I'm using Bower to manage my frontend dependencies and grunt-ember-templates to precompile handlebars templates.

Estas son las dependencias en bower.json:

"devDependencies": {
  "ember": "~1.3.1",
  "jquery": "~2.0.3",
  "normalize-css": "~2.1.3",
  "jquery.cookie": "~1.4.0",
  "font-awesome": "~4.0.3"

... y en package.json:

"devDependencies": {
  "bower": "~1.2.8",
  "grunt": "~0.4.2",
  "grunt-contrib-copy": "~0.5.0",
  "grunt-contrib-clean": "~0.5.0",
  "grunt-contrib-concat": "~0.3.0",
  "handlebars": "~1.3.0",
  "ember-template-compiler": "~1.4.0-beta.1",
  "grunt-ember-templates": "~0.4.18"

However, when I compile and run my Ember application I get this error:

Assertion failed: Ember Handlebars requires Handlebars version 1.0 or 1.1, COMPILER_REVISION expected: 4, got: 5 - Please note: Builds of master may have other COMPILER_REVISION values.

Uncaught Error: Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 2.0.0) or downgrade your runtime to an older version (<= 1.0.rc.2).

And these are the versions:

> "1.3.2"
> Handlebars.VERSION
> "v2.0.0-alpha.1"

Como ves handlebars is not mentioned explicitly as a dependency, but is rather resolved through Ember. But somehow it resolves to a newer (incompatible) version.

How do I fix the version of handlebars?

preguntado el 12 de febrero de 14 a las 08:02

Why do you have ember, jquery etc under devDependencies? should probably be under dependencies. For node packages dev dependencies is correct. -

1 Respuestas

Do bower install handlebars#1.3.0 --save, but yes this is a issue with bower. I saw you created

Respondido 19 Feb 14, 10:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.