2015-09-05 91 views
1

我剛剛嘗試設置grunt和handlebars的預編譯器。我得到這個錯誤訪問我的模板:用grunt-contrib-handlebars預編譯手柄版本問題

Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (>= 4.0.0) or downgrade your runtime to an older version (>= 2.0.0-beta.1). 

有誰知道如何解決它?

回答

1

沒關係,我認爲這個插件已經過時了。隨意如果我「錯了指正。

我用grunt-shell,只是使用的shell編譯它們(使用節點更新車把的版本後)....

shell: { 
     options: { 
      stderr: false 
     }, 
     handlebars: { 
      command: 'node_modules/handlebars/bin/handlebars src/templates/*.handlebars -f dist/js/templates.js' 
     } 
    },