grunt-data-uri icon indicating copy to clipboard operation
grunt-data-uri copied to clipboard

TypeError: Cannot read property 'indexOf' of undefined

Open monolithed opened this issue 10 years ago • 2 comments

dist: {
    src: [ "cache/views/index.css" ],
    dest: "cache/views/index.css",
}
➜ grunt dataUri
Running "dataUri:dist" (dataUri) task
[TypeError: Cannot read property 'indexOf' of undefined]
Warning: Cannot read property 'indexOf' of undefined Use --force to continue.
➜ uname -a
Darwin MacBook-Pro--Monolithed.local 14.1.0 Darwin Kernel Version 14.1.0: 
Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64

monolithed avatar Feb 18 '15 10:02 monolithed

I've got the same issue, running dataUri as a module

{
    src: ['css/*.css'],
    dest: 'temp'
}
→ grunt dataUri
Running "dataUri:all" (dataUri) task
Warning: Cannot read property 'indexOf' of undefined Use --force to continue.

Aborted due to warnings.
→ uname -a
Darwin MacBook.local 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64

joechrysler avatar Mar 13 '15 17:03 joechrysler

I've also run into this problem. You have to define the targets array in options. E.g.

{
    src: ['css/*.css'],
    dest: 'temp',
    options: {
        target: ['static/pics/**'],
    },
}

Of course, it could have a better error message.

susu avatar Nov 04 '15 13:11 susu