Tag Archives: gulp Cannot read property ‘apply’ of undefined

gulp Cannot read property ‘apply’ of undefined

Why are there a series of technical challenges behind “OMG buy it”>>>

When starting gulp, an error is reported as follows:

[14:35:32] Using gulpfile ~/Sites/tool/gulpfile.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
    gulpInst.start.apply(gulpInst, toRun);
                   ^

TypeError: Cannot read property 'apply' of undefined
    at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
    at process._tickCallback (internal/process/next_tick.js:61:11)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

Check the gulp version as follows:

➜  tool git:(master) gulp -v
[14:39:34] CLI version 3.9.1
[14:39:34] Local version 4.0.0

Solution:

npm i gulp-cli -g