title: Gulp and run-sequence error : Task is not configured as a task on gulp
body: <p>I'm trying to add <a href="https://www.npmjs.org/package/run-sequence" rel="nofollow">run-sequence</a> to my gulp workflow but I have this error every time I try to execute my task in which I use run-sequence : </p>
  
  <p><strong><em>Task  is not configured as a task on gulp.</em></strong></p>
  
  <p>According to the source of run-sequence, this is caused by this <a href="https://github.com/OverZealous/run-sequence/blob/6fc05b604a237532d0eefaa42fbb3cb23ec94108/index.js#L18" rel="nofollow">test</a> :</p>
  
  <pre><code>if (isTask &amp;&amp; !gulp.hasTask(t)) {
      throw new Error("Task "+t+" is not configured as a task on gulp.");
  }
  </code></pre>
  
  <p>My tasks are splitted into multiple file, and everything works fine if I execute a single task or a task with a dependence, the only error I have is on this one :</p>
  
  <pre><code>'use strict';
  
  var gulp = require('gulp'),
      runSequence = require('run-sequence');
  
  module.exports = gulp.task('default', function() {
      if (release) {
          runSequence(
              'clean',
              ['index', 'styles', 'images', 'fonts', 'templates'],
              'browserify',
              'minify'
          );
      } else {
          runSequence(
              'clean',
              ['index', 'styles', 'images', 'fonts', 'templates'],
              ['watchify', 'watch']
          );
      }
  });
  </code></pre>
  
  <p>The test shouldn't fail, because when I try to add this piece of code just before my runSequence function, it's output true for every task I try to execute in the function :</p>
  
  <pre><code>console.log(gulp.hasTask('clean'); // Output true
  runSequence(
      'clean',
      ['index', 'styles', 'images', 'fonts', 'templates'],
      ['watchify', 'watch']
  );
  </code></pre>
  
  <p>But I still have the error : <strong><em>Task clean is not configured as a task on gulp.</em></strong>
  Same if I remove 'clean' from the array, it will fail on the next task : <strong><em>Task index is not configured as a task on gulp.</em></strong></p>
  
  <p>If anybody have an idea about what's going on here...</p>
  
  <p>Thanks for the help.</p>