-
Notifications
You must be signed in to change notification settings - Fork 182
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
Rebuild does not happen ever #205
Comments
Working for me. My specs:
It could be you are running an old version of watchify (e.g. global install), or maybe something to do with the babel transform. I would do this:
And add a scripts to your package.json; this will run the local version: "scripts": {
"watch": "watchify -v -t babelify js/index.js -o js/bundle.js"
} Now |
@mattdesl your suggestion did not work. I was already working with and without npm.
Another clue is that Im using Vim to edit files, I suppose that is not relevant at all but I state it nevertheless. Perhaps the problem is fsevents. Thanks a lot for your help. Fran |
Just for the sake of removing obvious things I've tried:
I didnt work |
I am having issues with Vim as well. It actually does run the first few times that I save, and then it stops watching whatever file I'm working with. I think this has to do with how Vim saves. I think it does a "safe write" which fully replaces the file at once. |
@rashkov I saw your vim issue, I'll look into it. @franleplant Are you also using vim? If not, what editor? |
Im also using vim! |
Sublime text doesn't have this problem for me, and emacs either. Only Vim gives me trouble. So we are probably looking at two different issues. |
@rashkov what OS are you using? (It seems that we are experiencing different issues yes) |
I'm using Linux. You mentioned earlier that maybe it's an fsevents issue. From what I understand, watchify uses chokidar to watch for file changes, and chokidar uses fsevents to make that work on OS X systems. You might want to try to npm install chokidar and then run something like this, and then try saving your file to see if it picks up on that change. Make sure to change "./a.js" to the file that you're editing, of course.
|
I'm also having the same issue as @franleplant
When files are saved they're successfully kicking off my linters and other watch processes, but not Watchify. |
@rashkov run the test that you suggested and editing |
I spent the day fixing other thing so I haven't had a chance to test out what I'm about to suggest: w.r.t. the editor and the change event: If your editor isn't doing an "edit" but rather an "alternate-save-then-rename" (vim's swap file, or sublime's "atomic_save"), then I'm not entirely sure that chokidar fires a "change" event. maybe that's considered an "unlink" followed by an "add"? w.r.t. fsevents, have you tried watchify's "poll" option? that switches chokidar into polling mode, which IIUC does not use fsevents. w.r.t. other watchers working, #201 (comment) might offer some clues. |
I don't know if I was having the same problem but i solve mine by replacing watchify app/app.js -t babelify --outfile bundle.js --debug --verbose |
@zertosh , look at the test that suggested @rashkov that basically rules out that the problem is that vim or sublime are not triggering the chokidar update event. Also, I tried Also tried this |
Can verify that same as @franleplant. When I use
|
FWIW, I'm not getting rebuilds using any of these suggestions. I've tried to get this working using command line, npm, as well as gulp tasks -- all with no luck.
|
This has been an issue for me as well. Watchify runs the first time and waits, however it does not rebuild after a file has changed.
Tried it with::
And also with:
The |
@franleplant Since polling worked for you, I'm going to chuck this one to something unique about your setup and/or chokidar. If you happen to figure out the cause and it's addressable via a PR, I'd really appreciate it. @rashkov I'm super puzzled by your issue. I didn't see a comment as to whether polling worked for you or not. Can you check? @TylerK and @asinner: Please open new issues with specifics on your particular setup and use. |
@zertosh I agree, the problem is fixed for me, but the situation could be much better if we could just use watchify without the poll. Is there some tests I can run? For example attempting to run Watchify's own test suites on my system? Fran |
@franleplant Sure, the tests are pretty good. Are you by any chance watching files across NFS? I added polling because users who where running containers could only watch with polling. |
@zertosh nope, no containers or VMs. I cloned, installed watchify and then run the tests:
So, the tests are working in my system, perhaps there is not a test case that covers my particular case? I have the same problem with watching file with Fran |
@franleplant Yup pretty much every test relies on the watcher correctly firing an update event. I think nodemon uses The nodemon bit is strange. I'm on OS X 10.10.3 (bash 4.3.33(1)-release - not that I think it matters) and I normally edit with Sublime Text 3 (not that I think it matters either). My most watcher heavy projects run from gulp, and they involve watchify, multiple |
Yes, I agree this all seems strange, let me know if you find out anything. Thanks a lot for your support. |
@zertosh --poll helps, although it will still occasionally miss a 'change' event and not trigger the rebuild. However it doesn't just stop watching the file like it would without --poll. |
FWIW, I ran a test using watchify on a simple project. (2 files, 1 requires the other, no polling) and everything seems to be working fine. But when I use it on a complex project (20+ source files, nested directories 3+ levels) thats when I stopped working without the poll. I'll try and come up with a more specific example so we can narrow it down. |
@franleplant Np. @rashkov Grrr, that's weird. @Dudemullet Yes please, if you can come up with something I can test locally, that'd be awesome. wrt a complex project, I've got wayyyy bigger builds than that - with devs on different machines and envs. BUT, we do have shallow dir structures - 3 levels max. I have to run an experiment with something deeper. |
I'm running into this issue on Arch. I'm using Gulp as the task runner, and after about 20 seconds. Gulp say Here are my relevant configurations in
For polling, I tried gulp@3.8.11 This issue started happening after I upgraded my various dev dependencies. |
@jtcwang you should try to run watchify via the CLI. |
@jtcwang I don't think your issue is what's being talked about in this thread. Your issue doesn't seem to be related to watchify since your problem is with the length of the initial build. Please open a new issue with a bit more detail. |
FWIW: I've seen this issue with An easy test to see if (a few of my teammates had it broken for the entire |
@benmosher I've done the Nevertheless I did This is a really annoying bug in OS X's file system! @zertosh so this is a far as we can get towards resolving my original problem, maybe creating some notes in the |
@franleplant PR welcomed :) |
I know this is farfetched but, have you all updated to the latest version? Has not happened to me since. Thats why I haven't been able to reproduce a proper to test |
@zertosh done! Not sure about the doc styling so let me know if you want to present this info in some other way. |
Hi!
I've used watchify several times without problems, but right now it's not working for me.
This is the command I'm running:
watchify -v -t babelify js/index.js -o js/bundle.js
This are my specs:
Any ideas how to solve this?
Thanks!
Fran
The text was updated successfully, but these errors were encountered: