Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'indexOf' of undefined #13

Open
monolithed opened this issue Feb 18, 2015 · 2 comments
Open

TypeError: Cannot read property 'indexOf' of undefined #13

monolithed opened this issue Feb 18, 2015 · 2 comments

Comments

@monolithed
Copy link

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
@joechrysler
Copy link

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

@susu
Copy link
Contributor

susu commented Nov 4, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants