-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchify events are not firing #312
Comments
Yup getting something similar. Seems to be a chokidar issue in my case – files are being watched but chokidar change events are not triggering. |
Strange – in my case I renamed the folder to something else, tested, then renamed it back to its original name, and now everything is working again. |
Same here, on OSX. The issue seems to be with Chokidar. Watching ~100 files, if i leave the watcher open for a day the issue tends to happen. Restarting my machine consistently fixes it. I already tried increasing the watch limit (ulimit). Other, non-chokidar watcher don't have this issue. |
Same here on Windows using CLI. About one in three times, the change is not caught. |
Polling does not fix it for me. Nothing is triggering the rebundle. I'm running on Windows 10, using the latest versions of browserify, watchify, gulp, etc -- all npm modules are up-to-date. |
Same here on Windows 10 Home Premium 64 Bit. I am using polling by default but sometimes no changes where detected. Edit: A full Windows restart fixed it for me. But it wasn't the first time, the changes weren't detected. |
I was using Webstorm. I desactivate the safe save option. And now It works correctly. |
Same for me, the var b = watchify(browserify({
entries: './main.jsx',
debug: true, // Adds a source map inline to the end of the bundle
cache: { }, // Required by watchify plugin
packageCache: { } // Required by watchify plugin
}), {
poll: true
});
b.on('log', function(data) {
console.log(data);
});
b.on('update', function() {
console.log("UPDATE!");
return b.bundle()
.on('error', plugins.util.log.bind(plugins.util, 'Browserify Error'))
.pipe(source('build.js'))
.pipe(gulp.dest('./'))
.pipe(plugins.livereload());
}); Also |
I solved, I think it was my fault. I'm not sure why, but it looks like it's required to run the bundle function when the task executes the first time. So, to fix the code in my example, I had to move the code inside the var b = watchify(browserify({
entries: './main.jsx',
debug: true, // Adds a source map inline to the end of the bundle
cache: { }, // Required by watchify plugin
packageCache: { } // Required by watchify plugin
}));
var bundle = function() {
return b.bundle()
.on('error', plugins.util.log.bind(plugins.util, 'Browserify Error'))
.pipe(source('build.js'))
.pipe(gulp.dest('./'))
.pipe(plugins.livereload());
};
b.on('update', function() {
console.log("UPDATE!");
return bundle();
});
return bundle(); // <-- REQUIRED! Please note that both the official example and the code posted by @bokzor do not show my mistake, so, sorry for bothering with my case, but that issue is not solved for the other people I guess. Just do not consider my messages 😄 |
For folks who are using The nice thing about |
Hi,
For severals files in my project, watchify is not working...
I tried and searched a lot but I didn't find a clue how to resolve this.
Everything is up to date. I'm using OSx with no virtual machine
Here is my gulp task :
The text was updated successfully, but these errors were encountered: