Skip to content
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

Next fast refresh not working as expected #22317

Closed
joao-pedrozo opened this issue Feb 18, 2021 · 7 comments
Closed

Next fast refresh not working as expected #22317

joao-pedrozo opened this issue Feb 18, 2021 · 7 comments
Labels
please add a complete reproduction The issue lacks information for further investigation

Comments

@joao-pedrozo
Copy link

What version of Next.js are you using?

^10.0.7

What version of Node.js are you using?

14.8

What browser are you using?

Chrome

What operating system are you using?

Ubuntu 20.04

How are you deploying your application?

next dev

Describe the Bug

When I start the next dev server, it works pretty well until pass a few minutes like 2, then he starts a loading on the page, and when he finish the loading even if I update a file on the code, he does not update on screen so I have to go and restart the server because only works on the first ~2 minutes.

Important: I'd like to say that I has having a similar issue with the webpack-dev-server used by the Create React App, my server was also not updating and showing old versions but I refresh the page for like 3 times and then the content appears, I did the migration to the repository to nextjs instead CRA, but now I have a different issue. If you want to check if I did any wrong configuration, the link for the repo is: https://github.com/joao-pedrozo/reviewanything/tree/master/packages/frontend

Expected Behavior

I expected that the dev server should do the fast refresh correctly until I finish the server, and not stop working from nothing.

To Reproduce

Create an next app, run the dev server.

@joao-pedrozo joao-pedrozo added the bug Issue was opened via the bug report template. label Feb 18, 2021
@joao-pedrozo joao-pedrozo changed the title Next fast refresh not updating content Next fast refresh not working as expected Feb 18, 2021
@osequi
Copy link

osequi commented Mar 17, 2021

I have the same problem.

  • After editing an Emotion / CSS entry the browser is freezing all the time.
  • After editing non-CSS code (plain React) sometimes the browser is freezing.
  • After working only on an MDX file sometimes, after a few minutes the browser is freezing

@DannyFeliz
Copy link

Please upvote this discussion: #22214

@3e33
Copy link

3e33 commented Jun 18, 2021

Try creating a file called ".env.local" in your root project folder and add "WATCHPACK_POLLING=true" to it. Restart the server.

@Keshavdulal
Copy link

I was having a very similar issue in next 11.1.2 but when I downgraded to next 11.1.0, I got the "working" fast-refresh back.

Earlier... fast-refresh looked like it worked on the outside but wasn't really pulling in changes from the code although it would say it compiled successfully in the dev server.

@balazsorban44
Copy link
Member

Hi, @joao-pedrozo I'm going through older issues, I am curious if you could check out newer versions of Next (as of writing latest is 12.0.7) to see if things have improved for you.

Otherwise, an actual reproduction would be very helpful.

@balazsorban44 balazsorban44 added please add a complete reproduction The issue lacks information for further investigation and removed bug Issue was opened via the bug report template. labels Dec 7, 2021
@valerius21
Copy link

Hi @balazsorban44,the issue remains in npx create-next-app my-app --typescript repositories, when used in GitHub Codepaces. I needed, as previously mentioned, to create the environment variable.

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
please add a complete reproduction The issue lacks information for further investigation
Projects
None yet
Development

No branches or pull requests

7 participants