laravel elixir gulp watch不工作globule.js undefined indexof

时间:2017-02-26 10:37:35

标签: laravel gulp watch laravel-elixir

我在Ubuntu 16.04中有一个Laravel项目。

这是一个现有的项目,gulpfile.js在另一个系统上正常工作。

我的问题是gulp watch没有工作,只有这个错误出现了:

 TypeError: Cannot read property 'indexOf' of undefined
at /usr/lib/node_modules/gulp/node_modules/globule/lib/globule.js:25:16
at Array.reduce (native)
at processPatterns (/usr/lib/node_modules/gulp/node_modules/globule/lib/globule.js:24:30)
at Object.globule.find (/usr/lib/node_modules/gulp/node_modules/globule/lib/globule.js:76:17)
at Gaze.add (/usr/lib/node_modules/gulp/node_modules/gaze/lib/gaze.js:174:19)
at new Gaze (/usr/lib/node_modules/gulp/node_modules/gaze/lib/gaze.js:74:10)
at gaze (/usr/lib/node_modules/gulp/node_modules/gaze/lib/gaze.js:86:10)
at Object.module.exports [as watch] (/usr/lib/node_modules/gulp/node_modules/glob-watcher/index.js:12:17)
at Gulp.watch (/usr/lib/node_modules/gulp/index.js:40:14)
at /home/vagrant/votingmp/node_modules/laravel-elixir/dist/tasks/recipes/watch.js:26:18

有没有人遇到过同样的问题?我似乎无法找到任何解决方案

Cannot read property 'indexOf' of undefined
at /usr/lib/node_modules/gulp/node_modules/globule/lib/globule.js:25:16

任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,然后我意识到我的一个脚本文件生成错误,所以只需从<input>数组中删除它,除非请检查你的gulp.js内容。