不可能使用最新的ember与预编译的模板 [英] Not possible to use the latest ember with pre-compiled templates
问题描述
- Ember.VERSION:1.0.0-rc.5
- Handlebars.VERSION :1.0.0-rc.4
- jQuery.VERSION:1.9.1
I我正在使用 grunt-contrib-handlebars@0.5.9
预先编译我的模板(这是最新版本)。我不知道该包中包含哪些版本的把手,但启动应用程序时会收到以下错误:
未捕获模板使用较之前版本的Handlebars而不是当前的运行时。请将您的预编译器更新到较新版本(> = 1.0.0-rc.4)或将运行时级别降级到较旧版本(== 1.0.0-rc.3)。
我甚至尝试加载另一个handlebars的运行时(版本 1.0.0- rc.3
),但是ember不满意:
未捕获错误:断言失败: Ember Handlebars需要Handlebars版本1.0.0-rc.4,COMPILER_REVISION预期:3,得到:2 - 请注意:主机的构建可能有其他COMPILER_REVISION值。
所以ember需要1.0.0-rc.4,但是这个版本没有可用的grub预编译器。 Catch-22?
我应该删除预编译的模板吗?每次升级后,这个休息时间都会很麻烦...
你可以使用 emberTemplates
grunt任务,从这里: https://github.com / dgeb / grunt-ember-templates ,因为此版本具有更新的依赖关系,并由ember核心团队的成员维护。
我猜你已经知道,要使用 grunt-ember-templates
,您可以在 package.json
...
devDependencies:{
...
grunt-ember-templates :0.4.7
}
...
并运行 npm install
。
希望有帮助
I have just installed the latest ember starter kit. It has:
- Ember.VERSION : 1.0.0-rc.5
- Handlebars.VERSION : 1.0.0-rc.4
- jQuery.VERSION : 1.9.1
I am using grunt-contrib-handlebars@0.5.9
to pre-compile my templates (this is the latest version available). I do not know what version of handlebars is included in that package, but I get the following error when starting the application:
Uncaught Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 1.0.0-rc.4) or downgrade your runtime to an older version (== 1.0.0-rc.3).
I have even tried loading another handlebars' runtime (version 1.0.0-rc.3
), but ember is not happy about it:
Uncaught Error: assertion failed: Ember Handlebars requires Handlebars version 1.0.0-rc.4, COMPILER_REVISION expected: 3, got: 2 – Please note: Builds of master may have other COMPILER_REVISION values.
So ember needs 1.0.0-rc.4, but there is no grunt precompiler available for this version. Catch-22?
Should I drop pre-compiled templates? Having this break every time I upgrade ember is going to be very annoying ...
You could use the emberTemplates
grunt task, from here: https://github.com/dgeb/grunt-ember-templates since this version has the updated dependencies and is maintained from a member of the ember core team.
As I guess you already know, to use the grunt-ember-templates
you can define a dependence in your package.json
...
"devDependencies": {
...
"grunt-ember-templates": "0.4.7"
}
...
and run npm install
.
Hope it helps
这篇关于不可能使用最新的ember与预编译的模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!