Skip to content

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

Open

Description

@monolithed
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

Activity

  1. joechrysler commented on Mar 13, 2015

    @joechrysler

    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
  2. susu commented on Nov 4, 2015

    @susu
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions