Gulp, Cannot read property 'apply' of undefined
程序员文章站
2022-06-07 13:12:50
...
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
上一篇: Optional源码分析(未完)
下一篇: Java Optional
推荐阅读
-
js 报错 Uncaught TypeError: Cannot read property 'trim' of undefined
-
js报错 Cannot read property 'getAttribute' of null
-
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object
-
npm ERR! Cannot read property 'path' of null
-
js报错 Cannot read property 'getAttribute' of null
-
微信小程序报Cannot read property 'setData' of undefined的错误
-
webpack报错Cannot read property 'presetToOptions' of undefined
-
Extjs4---Uncaught TypeError: Cannot read property ‘items’ of undefined
-
JavaScript Uncaught TypeError: Cannot read property 'value' of null
-
Cannot read property 'tap' of undefined