title: Gulp4. "AssertionError : Task never defined" when calling or importing tasks
body: <p>Below you can see simplified view of an issue. Basically, I'm able to call <strong>task1.js</strong> using gulp.series in tasks <strong>task2,3.js</strong>, but once I add same code to call <strong>task1.js</strong> in <strong>task4.js</strong> - <code>Task never defined: task1</code> error gets thrown.
  There are more tasks in the tasks folder than in file structure example below. <br></p>
  
  <p>I've got three tasks,</p>
  
  <pre><code>...
  /tasks
     build.js
     clean.js
     dev.js
  gulpfile.babel.js
  ...
  </code></pre>
  
  <p>all of them required in gulpfile.babel.js using the require-dir package</p>
  
  <pre><code>import requireDir from 'require-dir';
  requireDir('./tasks', {recurse: true});
  </code></pre>
  
  <p>This allows me to call a task from <em>clean.js</em> at <strong>dev.js</strong>, and it works fine.</p>
  
  <pre><code>import gulp from 'gulp';
  gulp.task('dev', gulp.series('clean');
  </code></pre>
  
  <p>But after I add same code structure at <strong>build.js</strong>.</p>
  
  <pre><code>import gulp from 'gulp';
  gulp.task('build', gulp.series('clean');
  </code></pre>
  
  <p>it somehow breaks gulp stream (I guess), so now on any task call I get: 
  <br>
  <strong>$gulp dev</strong>
  <br><em>-AssertionError [ERR_ASSERTION]: Task never defined: clean</em>.</p>
  
  <hr>
  
  <p><strong>$gulp -v</strong></p>
  
  <pre><code>[11:50:11] CLI version 2.0.1
  [11:50:11] Local version 4.0.0
  </code></pre>