-
Notifications
You must be signed in to change notification settings - Fork 214
Weird behavior with Rollup running twice on save #188
Comments
Additional info: Node v13.5.0, npm 6.13.4, Mac OS Catalina 10.15.1 |
I have the same issue with the default Sapper rollup template. I am on macOS Mojave 10.14.5, Node 12.11.0/NPM 6.11.3. |
@lukeed suggested using Chokidar:
https://rollupjs.org/guide/en/#watch-options Applying Chokidar DID make the problem go away, but... I'm hesitant to close this ticket since the fix shouldn't necessarily be "just use Chokidar." It'd be nice to have a more permanent resolution to the problem. |
One more note, @silentworks said the problem seemed to be related to Node 12+ |
Fairly certain this isn't Rollup's fault. I've been having the same problem (I just thought it was supposed to do that, heh). I get double builds on Windows 10, Node 12.x, whether chokidar is enabled or not. I get single builds on Windows 10, Node 10.x, whether chokidar is enabled or not. On Node 12.x, a minimal rollup config only builds once where the sapper config builds twice. |
Okay, discovered a couple things. For starters, the issue I was running into (and seems to be slightly different from @arxpoetica's issue) is Sapper is not actually building twice, it's just printing the "rebuilding..." message twice. Pretty superficial, not related to file watching. As far as I can tell (again, for me), the difference between 10.x and 12.x stems from a subtle change in how I think @arxpoetica might be running into a combination of the |
@njbotkin it does appear to be two issues, yes |
Getting the same issue. In my case it causes the browser to refresh 2 or 3 times which is super annoying and slowing me down. I've tried debugging with running sapper locally but got a bit lost in node hell!
|
Downgrading from node v13 to v10 (using nvm) is my current workaround. Using |
Downgrading to node v10 ( |
Colleague and I had this, |
Same issue with node v14.4, on macOS 10.15.5. |
Anyone find a solution here without downgrading node? |
Same issue with node v12.19.1, sapper 0.27.0, Svelte 3.0.0, Rollup 1.20.0 running on macOS Big Sur 11.1
|
It's unclear where this behavior is stemming from (might be Rollup, might be Sapper, might be Svelte, might be something weird on my computer), but I'm just going to put it here until we can isolate a little better.
Problem: when saving files, Rollup/restart runs twice; it's inconsistent with different ways of saving/updating files.
To repeat the behavior, do the following:
Open up a second terminal window and try the following:
It's double saving/rolling up:
ODDLY if I open up the file and make a tweak in VIM, it does not double save/run. Can't figure out the difference.
The text was updated successfully, but these errors were encountered: