Skip to content

Warning: Object function () { ... } has no method 'indexOf' in verbose mode #1

@metrip

Description

@metrip

When using the imperative-style configuration syntax with Grunt in verbose mode, a Warning is given and processing stopped.

% grunt -v gulp:foo
[...]
Running "gulp:foo" (gulp) task
Verifying property gulp.foo exists in config...OK
Warning: Object function () {
          return gulp.src('foo').pipe(bar()).pipe(gulp.dest('bar'));
        } has no method 'indexOf' Use --force to continue.

Aborted due to warnings.

Configuration:

module.exports = function(grunt) {
  var gulp = require('gulp');
  grunt.loadNpmTasks('grunt-gulp');
  grunt.initConfig({
    gulp: {
      foo: function() {
        return gulp.src('foo').pipe(bar()).pipe(gulp.dest('bar'));
      }
    }
  });
  grunt.registerTask('default', ['gulp:foo']);
};

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