简体   繁体   中英

grunt syntax error issue on running grunt task

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"]);
};

Trying grunt first time, could not find anywhere about issue, what is problem here, when i ran grunt copy it throws error.

Loading "Gruntfile.js" tasks...ERROR

SyntaxError: Invalid or unexpected token

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

Any help would be greatly appreciated.

Sorry it's syntax error, my IDE not shown any error indications.

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

this is corrected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM