rob2d/greedux

Live reloading reloads on phantom changes in node_modules

Closed this issue · 4 comments

When running my greedux-generated application using npm run dev, the app is reloaded based on phantom changes within node_modules:
image
Instead of node_modules, odules is displayed, but I verified that the website hosted is being served with a folder named node_modules, not odules.
The reloading occurs to the point where detecting actual code changes can take more than ten minutes. The reloading is also incorrect in that no code changes actually occur within node_modules but the reloading still occurs.
I'm not sure what additional information would help determine why this issue is happening, so I'll link the whole codebase: https://github.com/DJankauskas/client-app/tree/feature/cms

rob2d commented

Hi,

Sorry for the super late reply on this; finally have more time lately. Just wondering: is this issue still happening? It seems perhaps something in your configuration was manually changed.

rob2d commented

Hey so, just following up here.

@DJankauskas are you still having trouble here? I have a little more bandwidth to troubleshoot this now, but if I don't hear back I will close this issue within the next day and assume you've determined the root cause (I also notice that your project seems to have active commits since posting).

Thanks.

Thank you for the response! As to answer your question, yes and no. The issue for me happened only when I was running npm run dev within the Windows Subsystem for Linux (which lets you run Linux binaries within Windows) but on a directory owned by Windows itself. I assume the reloading was some sort of bug in the bridge between the two environments, as it stopped when I moved the directory to live within the Windows Subsystem for Linux's environment. So I doubt you'll be able to do anything there. However, the reason I was using WSL in the first place was because the npm run dev command doesn't run properly on Windows because of differences in how its terminal works. If you'd like I can create a separate issue for that.

rob2d commented

Oh, thanks a lot for the insight on that! To be honest, I added those commands for some other people who tend to use standard npm script namespaces. Personally, I just happen to node app --dev and gulp myself as I usually have some other variations that I switch between on my own projects until they need some other external build steps, and deployment tends to be with pm2 -- understandably if you don't maintain the repo actively, that's a pita to remember. But this is also why I the repo exists vs just using Webpack when you want to spin up non trivial projects in the long term 😄

For the sake of organizing the issues, yeah that would definitely help me to look into it if you could create another issue specifically with this problem. Appreciate your contribution here (and for using this repo). And thanks for the patience; was tied up working with another tech stack recently @ work. If you can elaborate on that in an issue, I should have time earlier this week to take care of it.