[英]Uncaught Error: Template was precompiled with an older version of Handlebars
我正在使用Bower管理我的前端依賴項和grunt-ember-templates
來預編譯把手模板。
這些是bower.json
中的依賴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"
}
...並在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"
},
但是,當我編譯並運行我的Ember應用程序時,我收到此錯誤:
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).
這些是版本:
> Ember.VERSION
> "1.3.2"
> Handlebars.VERSION
> "v2.0.0-alpha.1"
如您所見, handlebars
沒有明確地作為依賴提及,而是通過Ember解決。 但不知何故,它解析為更新(不兼容)的版本。
如何修復handlebars
的版本?
bower install handlebars#1.3.0 --save
,但是這是涼亭的問題。 我看到你創建了https://github.com/bower/bower/issues/1114
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.