gulp -v
CLI version 3.9.1
Local version 4.0.0
這里的CLI版本是什么意思惧眠?不懂?
但是npm上發(fā)布的gulp-cli的版本最新是2.0.0,執(zhí)行g(shù)ulp命令后才會(huì)出現(xiàn)下面的錯(cuò)誤
在gulp的github的issue里找到解決方案是全局安裝下gulp-cli:
npm i gulp-cli -g
錯(cuò)誤消失
/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: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:607:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3