-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby develop
only sporadically recompiles on save
#3043
Comments
Hi @ahstro did you see #2960 (comment) &/or #2983 (comment) and newer comments in both? You may be able to resolve your issues by passing until we go back to |
@rdela That did not seem to do it, unfortunately. I dug a bit deeper and realized you were using chokidar under the hood, so I found a workaround by forcing it to use polling with the |
@ahstro Sorry to hear it did not help, glad you found a workaround. I am inclined to say leave this open as may indicate a different issue specific to your environment or Gatsby setup/use causing you issues with chokidar. Could help others or best case, lead to an eventual fix that lets you stop forcing polling. |
@ahstro Can you please specify how you fixed by forcing |
Nevermind, I saw in the code that it uses environment variables on its host shell, so I came up with a basic script that enforces syncrhonous polling in chokidar. If anyone else has ahstro's problem or mine where it the dev server connects to the client correctly, but file changes aren't being detected or acted upon by gatsby develop (seen if files inside of #!/bin/bash
export CHOKIDAR_USEPOLLING=1
gatsby develop --host localhost This has addressed all of my problems with |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
Running
gatsby develop
on my project, I expect my code to be recompiled whenever I change and save a file, but this is rarely happens. It's usually fine for the first save, but after that it seems completely random, most often requiring me to kill the process and run it again (wasting, as you can imagine, a lot of time).I thought it might be related to the rate at which I save (I've got my save key combo lodged deep in my muscle memory, firing after almost any change, or when idle), but even when forcing myself to only save once every minute or two, it still does not work properly.
I don't have this problem with other file watchers, e.g., whatever
create-elm-app
is using.gatsby develop
only sporadically recompiles on save. With others, (I think chokidar) I've had to use their polling mechanism, but you don't seem to offer one, as far as I can't tell?I'm running the latest version of Gatsby as of writing this (
1.9.119
) on Arch Linux with nodev9.2.0
. Here are my relevant files asked for inCONTRIBUTING.md
:gatsby-config.js
:package.json
:gatsby-node.js
:The text was updated successfully, but these errors were encountered: