{"action":"closed","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/1287","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/1287/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/1287/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/1287/events","html_url":"https://github.com/gulpjs/gulp/issues/1287","id":108707272,"number":1287,"title":"Gulp 4:  TypeError: undefined is not a function when passing array inside array","user":{"login":"demisx","id":4452412,"avatar_url":"https://avatars.githubusercontent.com/u/4452412?v=3","gravatar_id":"","url":"https://api.github.com/users/demisx","html_url":"https://github.com/demisx","followers_url":"https://api.github.com/users/demisx/followers","following_url":"https://api.github.com/users/demisx/following{/other_user}","gists_url":"https://api.github.com/users/demisx/gists{/gist_id}","starred_url":"https://api.github.com/users/demisx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demisx/subscriptions","organizations_url":"https://api.github.com/users/demisx/orgs","repos_url":"https://api.github.com/users/demisx/repos","events_url":"https://api.github.com/users/demisx/events{/privacy}","received_events_url":"https://api.github.com/users/demisx/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-28T17:33:23Z","updated_at":"2015-09-28T21:01:03Z","closed_at":"2015-09-28T21:01:03Z","body":"```bash\r\n$ gulp -v\r\n[10:23:57] CLI version 0.4.0\r\n[10:23:57] Local version 4.0.0-alpha.1\r\n```\r\n\r\nWe have a `watch:code` task defined like this:\r\n\r\n```js\r\nvar paths = {\r\n  html: ['app/**/*.shtml', 'app/**/*.html'],\r\n  js: 'app/**/*.js',\r\n  images: 'app/**/*.{JPG,jpg,png,gif}',\r\n  json: 'app/**/*.json',\r\n  ... ... ...\r\n}\r\n\r\ngulp.task('watch:code', function () {\r\n  gulp.watch([\r\n    paths.html,\r\n    paths.js,\r\n    paths.images,\r\n    paths.json\r\n    ], gulp.series('build', browserSync.reload));\r\n});\r\n```\r\n\r\nRunning this task generates this error now:\r\n```bash\r\n[10:21:25] Starting 'watch:code'...\r\n[10:21:25] 'watch:code' errored after 3.53 ms\r\n[10:21:25] TypeError: undefined is not a function\r\n    at EventEmitter.FSWatcher._getWatchHelpers (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/node_modules/chokidar/index.js:241:15)\r\n    at EventEmitter.FsEventsHandler._addToFsEvents (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/node_modules/chokidar/lib/fsevents-handler.js:292:17)\r\n    at Array.forEach (native)\r\n    at EventEmitter.FSWatcher.add (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/node_modules/chokidar/index.js:420:11)\r\n    at Object.exports.watch (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/node_modules/chokidar/index.js:508:33)\r\n    at Gulp.watch (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/index.js:38:26)\r\n    at /Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/gulpfile.js:242:8\r\n    at bound (domain.js:254:14)\r\n    at runBound (domain.js:267:12)\r\n    at asyncRunner (/Users/dmoore/projects/amgen-sites/sensiparhcp-com-templates/node_modules/gulp/node_modules/undertaker/node_modules/bach/node_modules/async-done/index.js:38:18)\r\n```\r\n\r\nThe error seems to happen when passing an array of paths to the `gulp.watch()` function when one or more of those paths is also an array.\r\n"}}