使用 grunt-contrib-handlebars 版本问题预编译 Handlebars

Precompiling Handlebars with grunt-contrib-handlebars version issue

我刚刚尝试为 grunt 和 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).

有人知道怎么解决吗?

没关系,我认为该插件对于 Grunt 来说已经过时了。如果我错了,请随时纠正我。

我使用了 grunt-shell 并且只是使用了 shell 来编译它们(在使用 node 更新 handlebars 的版本之后)....

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