gulp -v
CLI version 3.9.1
Local version 4.0.0
这里的CLI版本是什么意思?不懂?
但是npm上发布的gulp-cli的版本最新是2.0.0,执行gulp命令后才会出现下面的错误
在gulp的github的issue里找到解决方案是全局安装下gulp-cli:
npm i gulp-cli -g
错误消失
/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
网友评论