Fixits are small posts that provide a straight forward answer for issues that occur during development.
When you’re working on Hybrid apps or Web apps with a tool belt including Grunt it is possible that Gulp is giving you the “TypeError: Cannot read property ‘apply’ of undefined” finger. I’ve experienced this when using a Yeoman generator and Grunt wouldn’t nudge.
Grunt functioning like normal (building with grunt / grunt build.
TypeError: Cannot read property 'apply' of undefined
at C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129: 19
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:577:11)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
Reinstall gulp-cli did fix this for me:
npm install -g gulp-cli
I found this after Googling around: https://github.com/gulpjs/gulp-cli/issues/31. Although code version 4 – and using npm install -g “gulpjs/gulp-cli#4.0” – isn’t appropriate anymore it led me to try to re-install gulp-cli.