Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gruntjs 使用grunt contrib车把版本问题预编译车把_Gruntjs_Handlebars.js - Fatal编程技术网

Gruntjs 使用grunt contrib车把版本问题预编译车把

Gruntjs 使用grunt contrib车把版本问题预编译车把,gruntjs,handlebars.js,Gruntjs,Handlebars.js,我刚刚尝试为grunt和Handlebar设置预编译器。访问我的模板时出现以下错误: 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

我刚刚尝试为grunt和Handlebar设置预编译器。访问我的模板时出现以下错误:

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来说已经过时了。如果我错了,请随时纠正我

我使用了
gruntshell
,只是使用shell来编译它们(在使用node更新handlebar的版本之后)

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