{"action":"created","issue":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/282","labels_url":"https://api.github.com/repos/paulmillr/chokidar/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/paulmillr/chokidar/issues/282/comments","events_url":"https://api.github.com/repos/paulmillr/chokidar/issues/282/events","html_url":"https://github.com/paulmillr/chokidar/issues/282","id":68852976,"number":282,"title":"File watcher with usePolling: true not completing task?","user":{"login":"noahgrant","id":1355779,"avatar_url":"https://avatars.githubusercontent.com/u/1355779?v=3","gravatar_id":"","url":"https://api.github.com/users/noahgrant","html_url":"https://github.com/noahgrant","followers_url":"https://api.github.com/users/noahgrant/followers","following_url":"https://api.github.com/users/noahgrant/following{/other_user}","gists_url":"https://api.github.com/users/noahgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/noahgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahgrant/subscriptions","organizations_url":"https://api.github.com/users/noahgrant/orgs","repos_url":"https://api.github.com/users/noahgrant/repos","events_url":"https://api.github.com/users/noahgrant/events{/privacy}","received_events_url":"https://api.github.com/users/noahgrant/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-16T06:08:41Z","updated_at":"2015-04-16T17:17:59Z","closed_at":"2015-04-16T16:11:36Z","body":"Hi, I have a strange issue--I've resorted to setting `useFsEvents = false` because of #219 , except when I do that, my other watched callbacks only execute once. Here's an example:\r\n\r\n```js\r\n  gulp.task('watchify', function() {\r\n    var bundler = browserify({\r\n          entries: [\r\n            './path/to/entry.js\r\n          ],\r\n          cache: {},\r\n          debug: true,\r\n          fullPaths: true,\r\n          insertGlobals: true,\r\n          packageCache: {}\r\n        }\r\n      ),\r\n      rebundle = function(ids) {\r\n        return bundler.bundle()\r\n          .on('error', errorHandler)\r\n          .pipe(source('mybundle.js'))\r\n          .pipe(buffer())\r\n          .pipe(gulp.dest('./build/js/'));\r\n      };\r\n\r\n    if (env.dev()) {\r\n      bundler = watchify(bundler, {\r\n        poll: 750 // sets useFsEvents to false and usePolling to true in chokidar\r\n      });\r\n      bundler.on('update', rebundle);\r\n    }\r\n\r\n    return rebundle();\r\n  });\r\n\r\n  gulp.task('jshint', function() {\r\n    return gulp.src(sources.scripts)\r\n        .pipe(watch(sources.scripts))\r\n        .pipe(plumber())\r\n        .pipe(jshint())\r\n        .pipe(jshint.reporter(stylish));\r\n  });\r\n```\r\n\r\nIf I run `gulp watchify jshint` and then save `myGreatModule.js`, watchify will pick up on the change, and jshint will run.  If I save `myGreatModule.js` _again_, only watchify will run--jshint will not.  If I remove the `poll: 750` line, both watchify and jshint run on every save.  Can you explain why and what I can do to fix it?  Does watchify need to emit an 'end' event or something to let gulp know that the rebundle method has completed?"},"comment":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/comments/93788914","html_url":"https://github.com/paulmillr/chokidar/issues/282#issuecomment-93788914","issue_url":"https://api.github.com/repos/paulmillr/chokidar/issues/282","id":93788914,"user":{"login":"noahgrant","id":1355779,"avatar_url":"https://avatars.githubusercontent.com/u/1355779?v=3","gravatar_id":"","url":"https://api.github.com/users/noahgrant","html_url":"https://github.com/noahgrant","followers_url":"https://api.github.com/users/noahgrant/followers","following_url":"https://api.github.com/users/noahgrant/following{/other_user}","gists_url":"https://api.github.com/users/noahgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/noahgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahgrant/subscriptions","organizations_url":"https://api.github.com/users/noahgrant/orgs","repos_url":"https://api.github.com/users/noahgrant/repos","events_url":"https://api.github.com/users/noahgrant/events{/privacy}","received_events_url":"https://api.github.com/users/noahgrant/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T17:17:59Z","updated_at":"2015-04-16T17:17:59Z","body":"Okay, thanks @es128.  For posterity, I should add that if I update `gulp-watch` and do _not_ force `useFsEvents` to false (so two chokidars running in separate modes), jshint will run on repeated saves as expected."}}