cannot read property 'apply' of undefined gulp : <p>I am trying to use the ng-factory generator to scaffold a new project to build an angularjs component. After the project has been created with the yo ng-factory command, I tried to run it using the gulp serve task but found the following error:</p>

<pre><code>c:\projects\bywebclient&gt;gulp serve
[11:20:51] Loading C:\projects\bywebclient\gulp_tasks\browsersync.js
[11:20:52] Loading C:\projects\bywebclient\gulp_tasks\karma.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\misc.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\webpack.js
[11:21:07] Using gulpfile c:\projects\bywebclient\gulpfile.js
C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
</code></pre>

<p>^</p>

<blockquote>
  <p>TypeError: Cannot read property 'apply' of undefined<br>
  at C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:
  19<br><br>
  at _combinedTickCallback (internal/process/next_tick.js:67:7)<br>
  at process._tickCallback (internal/process/next_tick.js:98:9)<br>
  at Module.runMain (module.js:577:11)<br>
  at run (bootstrap_node.js:352:7)<br>
  at startup (bootstrap_node.js:144:9)<br>
  at bootstrap_node.js:467:3<br></p>
</blockquote>

<p>Am I missing something? I already tried to run again the npm install</p>

<p>Thanks,
Atul Kale</p>
