[英]Not possible to use the latest ember with pre-compiled templates
我剛剛安裝了最新的ember入門套件。 它有:
我正在使用grunt-contrib-handlebars@0.5.9
預編譯我的模板(這是最新版本)。 我不知道該軟件包中包含哪個版本的把手,但是在啟動應用程序時出現以下錯誤:
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).
我甚至嘗試加載另一個把手的運行時(版本1.0.0-rc.3
),但是ember並不滿意它:
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.
所以ember需要1.0.0-rc.4,但是這個版本沒有可用的預編譯程序。 第二十二條軍規?
我應該刪除預編譯的模板嗎? 每次升級余燼都有這個休息時間會很煩人......
你可以使用emberTemplates
grunt任務,從這里開始: https : //github.com/dgeb/grunt-ember-templates,因為這個版本有更新的依賴項,並且是由ember核心團隊的成員維護的。
我猜您已經知道,要使用grunt-ember-templates
您可以在package.json
定義依賴關系
...
"devDependencies": {
...
"grunt-ember-templates": "0.4.7"
}
...
並運行npm install
。
希望能幫助到你
我有同樣的問題 - 相同的錯誤消息。 在我的情況下問題是我使用的是一個包含一些由先前版本的grunt-ember-handlebars
編譯的模板的ember庫所以我得到了一個由當前版本的grunt-ember-handlebars編譯的新版本的庫這解決了這個問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.