gulp Canot read property'appy'of undefined

1259 ワード

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
 
転載先:https://www.cnblogs.com/fe-cherrydlh/p/10717029.html