启动gulp的时候报错如下:
[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)
查看gulp版本为:
? tool git:(master) gulp -v [14:39:34] CLI version 3.9.1 [14:39:34] Local version 4.0.0
解决方案:
npm i gulp-cli -g
gulp Cannot read property 'apply' of undefined
原文:https://www.cnblogs.com/fe-cherrydlh/p/10717029.html