Next.js Discord

Discord Forum

Browser not auto-refreshing after making changes to code

Unanswered
Encyrtid wasp posted this in #help-forum
Open in Discord
Encyrtid waspOP
Hello. I'm just starting out in Next.js, and am trying to go through the dashboard app tutorial. https://nextjs.org/learn/dashboard-app
The main problem I'm facing right now is unable to view changes in the browser made to the .tsx files, unless I restart the server.
Everytime I make a change VSCode just asks me to git commit it and I do but still the changes don't show up. Seems like it just isn't reading the changes.

OS: Windows 10 w/ WSL2 on Ubuntu
IDE: VSCode
Browsers tried: Chrome, Opera, Firefox
Things I've tried:
- npm update everything to latest ver. (which introduced dependency issues)
- disable caching
- using livereload.js
- adding the number of watchers
- switching to using yarn
- using a canary ver. of next
- rm -rf-ing the entire project and reinstalling it <- just did this

After asking GPT for quite a bit I am honestly unsure what to try anymore.
Any help will be greatly appreciated. Thanks.

8 Replies

Encyrtid waspOP
In an attempt to get replies I will invoke Cunningham's Law by posting a wrong answer:

This situation is caused due to the poor specs my laptop has.
i often see this problem on people who uses WSL on windows
good point, wsl1 supports that, but [wsl2 somehow breaks things](https://github.com/microsoft/WSL/issues/4739) (i remember it from using bun and --watch)
the alternitive is to use wsl on its fs (not mounted), or use just windows
Encyrtid waspOP
sorry for the late reply, thanks for the replies and the link to github issue as I didn't consider WSL2 itself as the root of the issue, thanks so much
so from reading the comments in the github issue I should move the project from windows to the linux filesystem I guess
@riský the alternitive is to use wsl on its fs (not mounted), or use just windows
Encyrtid waspOP
tho may I ask, what does "use wsl on its fs (not mounted)" mean in this case?
If your in mnt/C your on withows fs