Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grunt-contrib-copy throwing Warning: Arguments to path.join must be strings Use --force to continue

Tags:

gruntjs

I am trying to add a copy task to copy some js files. But I am getting following warning and files stopped copying.

Running "copy:group1" (copy) task
Warning: Arguments to path.join must be strings Use --force to continue.

Aborted due to warnings.

Gruntfile.js

module.exports = function(grunt) {

    grunt.initConfig({
        copy : {
                group1 : {
            files : [
                {
                        src : ['group1/js/*'],
                        dest : ['lib/group1/js/']
                    }
                ]
            }
        }
    });

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

Following is the result of grunt copy -v

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "grunt-contrib-copy" local Npm module tasks.
Reading /home/sasidhar/projects/grunt/node_modules/grunt-contrib-copy/package.json...OK
Parsing /home/sasidhar/projects/grunt/node_modules/grunt-contrib-copy/package.json...OK
Loading "copy.js" tasks...OK
+ copy
Loading "Gruntfile.js" tasks...OK
>> No tasks were registered or unregistered.

Running tasks: copy

Running "copy" task

Running "copy:group1" (copy) task
Verifying property copy.group1 exists in config...OK
Files: group1/js/js1.js, group1/js/js2.js, group1/js/js3.js -> lib/group1/js/
Options: processContent=false, processContentExclude=[]
Warning: Arguments to path.join must be strings Use --force to continue.

Aborted due to warnings.

I already referred to other Stackoverflow Question on the similar error. But my GruntJS is already having the fix mentioned by Sindre Sorhus.

Thanks in Advance.

like image 268
Sasidhar Vanga Avatar asked May 29 '13 06:05

Sasidhar Vanga


1 Answers

Got it,

dest property must be a string. but not an Array.

Thanks.

like image 72
Sasidhar Vanga Avatar answered Oct 23 '22 08:10

Sasidhar Vanga