question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fast Refresh is lagging one "save" behind

See original GitHub issue

Thanks for the plugin!

I installed the plugin as described in the readme and it’s basically working to fast refresh the page. But I am encountering an issue that causes the following weird behavior:

  • I change some code and save it - Server side, webpack compiles until it says i 「wdm」: Compiled successfully.
  • Client-side in the browser, I see that it got noticed of something happening: image

But it does not seem to receive the completed compile.

  • Now if I save another time, server side webpack compiles again and client-side, it receives the update: image As you can see, before it did not reach the point “App is up to date”

This actually stays like this meaning the Browser gets updated with 1 save behind:

  • In the code, I change a string from “Test” to “Test2”
  • Save
  • Browser still shows “Test” (even though, in the Browser console it updates and comes to the last line “App is up to date” now)
  • Save again
  • Browser shows “Test2”
  • Change the string to “Test3”
  • Save
  • Browser still shows “Test2”
  • Change the string to “Test4”
  • Save
  • Browser updates to “Test3”

Server-side, it says (for each save):

i 「wdm」: Compiling...
node_modules/webpack-log/src/loglevel/PrefixFactory.js:55
webpack building...
...
i 「wdm」: Compiled successfully.

As said above, after the first save, it says for each update in the Browser "“App is up to date”. So it kind of seems to miss the first compile completion and therefore always lags one save behind.

Do you have any idea what could be causing this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pmmmwhcommented, Sep 20, 2020

@IronSean I think you’re hitting a recursion issue with HMR. If you remove webpack.HotModuleReplacementPlugin() while keeping hot: true in devServer your setup should work. You probably would want remove the typescript for babel since you’re using ts-loader for transpilation. Probably you will only need react-refresh/babel for ts files …

0reactions
pmmmwhcommented, Sep 13, 2021

Tested with the latest release and cannot reproduce anymore.

If the issue still persists, feel free to re-open or file a new issue with reproduction, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Windows 11 Lagging and Slow Problem [Quick Fix]
In this video tutorial, I will show you guys how to fix Windows 11 slow and lagging problem.Commands: sysdm.cpltaskmgr or Task Manager Note: ......
Read more >
How to FIX SLOW XBOX ONE and MENU LAG + ... - YouTube
Do you want to know how to FIX YOUR SLOW XBOX ONE menu lag and slow dashboard response times??? In this xbox one...
Read more >
Why is my Power BI refresh so SLOW?!? 3 Bottlenecks for ...
It's really frustrating when your Power BI refresh takes too long or times out! Adam breaks down 3 bottlenecks that can slow down...
Read more >
Screen refresh lags behind - TeamViewer Community
For a while now, my TeamViewer 13 remote sessions are lagging behind on refreshing the screen as a result of user input. Well,...
Read more >
Things to Check When Adobe Premiere Pro Is Lagging
Quickest Solutions for the Most Improvement · 1. Turn on GPU Acceleration · 2. Lower Playback Resolution · 3. Purge Media Cache Files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found