grunt-jscpd icon indicating copy to clipboard operation
grunt-jscpd copied to clipboard

Warning: Unknown mode: [object Object] Use --force to continue.

Open akinnee opened this issue 9 years ago • 7 comments

Getting this:

Running "jscpd:javascript" (jscpd) task
warn: File .cpd.yaml not found in current directory, or it is broken
info: Files search time: duration=21275ms
info: Scaning 464 files for duplicates...
>> Error: Unknown mode: [object Object]
Warning: Unknown mode: [object Object] Use --force to continue.

Here is my config:

grunt.config.set('jscpd', {
        javascript: {
            path: './',
            files: 'app/**/*.js',
            exclude: [
                '**/node_modules/**',
                '**/compiled/**',
                '**/templates/**',
                '**/vendor/**',
                '**/*_compiled.js',
                '**/*Template.js'
            ],
            output: 'tests/_duplicates-report.xml'
        }
    });

And I'm running the command grunt jscpd.

akinnee avatar Mar 04 '15 21:03 akinnee

I've got the same problem. Seems to be a massive difference in the package npm downloads now compared to the one a week or two ago which is very confusing since there hasn't been any activity in github for a while

glispajon avatar Mar 16 '15 16:03 glispajon

+1 me too. same issue

did you guys got any solution to the above problem? I am getting it too :(

vikash20186 avatar Aug 13 '15 20:08 vikash20186

nope. and no response. the plugin is simply not working.. I was sure someone would post something.

I found out that .html files might cause the problem. if I run the plugin on app/scripts - which contains only .js files - everything works great.

update: adding '**/*.html', to exclude configuration resolved the issue for me. - this is no longer an issue for me. I vote to close.

Agree that adding html causes the problem. But, I want to find duplicates in html, as well. However, I'm using straight jscpd with no grunt/gulp wrapper. So, this is a jscpd issue, not and issue with the grunt plugin here.

skyl avatar Sep 11 '15 19:09 skyl

I had the same issue and with excluding */.html it worked.

Chris2011 avatar Nov 26 '15 14:11 Chris2011