mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.17k stars 106 forks source link

budo ceasing to detect new edits sometimes #227

Open hackergrrl opened 6 years ago

hackergrrl commented 6 years ago

First of all: I :heart: budo. Thank you for building this fantastic tool.

I've been using budo to dev on regl projects, and notice that once in a while budo will stop detecting JS file edits. I'll be hacking away on a single file (e.g. index.js) and at some point I'll be refreshing and not seeing my changes, and eventually think to look at the budo stdout log, which is showing my GETs but no more (browserify) entries. If I restart budo it starts chugging along again fine.

So far I don't have any more clues than this -- last seen on 11.2.0. I'll update here if I learn more.

mattdesl commented 6 years ago

Hmm that's odd, I haven't seen this. Can you list more details on node, npm and OS version? Have you tried deleting node_modules and re-installing them? Can you also run npx budo --version in your project with budo installed to tell me which versions it lists there of different packages? (The npx is to ensure it checks the locally installed budo, rather than a globally installed budo)

This basically means watchify is not picking up a file change for some reason.

hackergrrl commented 6 years ago

node v8.11.1 npm v5.6.0 budo v11.2.0 browserify v16.2.0 watchify v3.11.0 Linux 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64

I'll wipe node_modules/ and see if I notice it again. I can't reliably reproduce yet.

kerwitz commented 6 years ago

Same here with these versions:

node v10.1.0 budo v11.2.0 browserify v16.1.1 watchify v3.11.0

It has gotten so bad that I restarted budo manually most of the time, which introduced slow startup times into every minor change I made. After checking out this ticket I wiped away node_modules and did a fresh install and all is working fine again. So thanks @mattdesl for the heads up! Things can be so easy at times.


Edit: well to bad, reloading is still not working correctly. First few changes were detected very well, then it started to miss in-line changes. After that I had to add new lines for something to happen and now it is back to picking up changes completely at random.

Should we open an issue with Watchify? Any more feedback we can give to narrow the cause down?

mattdesl commented 6 years ago

@kerwitz Sorry I can't help much, since I can't reproduce.

Two things to try:

To test watchify:

# move into an empty folder
cd some-empty-folder

# write a plain index.js file
touch index.js

# add pkg.json
npm init -y

# install watchify locally
npm install watchify --save-dev

# run watchify
npx watchify index.js -d -v -o bundle.js

Once watchify is running, try changing index.js around a bunch, adding some new requires() and additional files/modules and so forth, and you should see logs each time. If you make a file change and don't see the log appear in terminal, it means watchify is the culprit.