Not reloading browser (WSL)
See original GitHub issueIssue details
Browsersync is failing to reload my browser. I’m attempting to use it for the first time on a new machine, running WSL. In the simplest case this manifests as the browser not reloading when files are changed. I have also tried running a couple of different static site generators (11ty and Jigsaw), in both cases the servers become unresponsive after a file is changed, hanging at [reloading browser]. (I have used both of these tools successfully on another machines running WSL).
Steps to reproduce/test case
- Create
index.html
- Create
css/styles.css
- Run
browser-sync start --server --files "css/*.css"
- Edit
css/styles.css
Please specify which version of Browsersync, node and npm you’re running
- Browsersync [ 2.26.13 ]
- Node [ 8.17.0 ]
- Npm [ 6.13.4 ]
Affected platforms
- linux
- windows
- OS X
- freebsd
- solaris
- other (please specify which)
Browsersync use-case
- API
- Gulp
- Grunt
- CLI
If CLI, please paste the entire command below
browser-sync start --server --files "css/*.css"
for all other use-cases, (gulp, grunt etc), please show us exactly how you’re using Browsersync
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
WSL 2 , React not reloading with file changes? - Stack Overflow
In my experience, this occurs when your source is on a Windows drive (e.g. /mnt/c ) since the driver that WSL uses for...
Read more >WSL 2: React not reloading with file changes - Reddit
I recently installed WSL 2 but when I create an app using create-react-app and use npm start the app is not reloaded when...
Read more >Fixing Hot Module Reload of Vite App in WSL - YouTube
Is hot reloading not working in your app created with Vite? For Windows and WSL users polling might the solution to your problems....
Read more >Remote WSL connection doesn't update Vue.js app on code ...
Create a new Vue.js project (or anything that support live reloading); Use WSL node.js instead of bundled one; Start debugging; Edit some code....
Read more >Troubleshooting Windows Subsystem for Linux | Microsoft Learn
This is likely because your machine has not yet taken the backport for WSL 2. The simplest way to resolve this is by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to fix a ton of unexpected Browser-sync behavior and slowness in WSL2 by making sure all my projects are under my WSL home user path
/home/user/
rather than under a Windows path/mnt/c/
.@smth Not sure which IDE you’re using, but if you’re using Visual Studio Code and want to have the files in WSL2, you can install the
Remote - WSL
extension in visual studio code.code .
yarn start
in your WSL2 terminal, open the browser with browsersync, and edit code in your VS Code window on the host machine, and it will perfectly reload the browser when you save code in VS Code now!I hope this helps, it works for me!