gpt4 book ai didi

javascript - 运行 grunt 任务时的 grunt 语法错误问题

转载 作者:行者123 更新时间:2023-11-30 19:00:18 26 4
gpt4 key购买 nike

module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

copy: {
t1:{
src: 'dir1/*',
dest: 'dir2/'
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy);
grunt.registerTask('default', ["copy"]);
};

第一次尝试 grunt,找不到任何问题,这是什么问题,当我运行 grunt copy 时它抛出错误。

Loading "Gruntfile.js" tasks...ERROR

SyntaxError: Invalid or unexpected token

Warning: Task "copy" not found. Use --force to continue.*

如有任何帮助,我们将不胜感激。

最佳答案

抱歉,这是语法错误,我的 IDE 没有显示任何错误指示。

grunt.loadNpmTasks('grunt-contrib-copy');

这已更正。

关于javascript - 运行 grunt 任务时的 grunt 语法错误问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59582911/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com