-
Notifications
You must be signed in to change notification settings - Fork 315
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
Live Server not working in WSL 2 #53
Comments
I'm going through the same error, did anyone solve it? |
No :( |
It was working for me just find and then today I had the same problem as you guys. So I did what fixes actually most of the problems, I restarted my device. Now it works again, crazy! Maybe you guys are trying it too after having your device in sleep/stand-by for a longer time? Furthermore, while it didn't work to connect to the live-server through my Windows browser, it did by connecting it through an XServer. I have one installed in Windows and after I started it, the live-server started in VS Code in WSL automatically opened the browser window in the installed browser in my WSL. (Whenever I say WSL I mean WSL2 of course) Anyhow, after a restart of my device I could connect again without any problems to the live-server through my Windows browser, both with localhost:xxxx and 127.0.0.1:xxxx Hope I could help and it fixes the problem for you too. |
Same problem bro, but when I copy the address http://127.0.0.1:5500/, it works fine. |
This can be achieved using the wslview utility and setting the $BROWSER environment variable to 'BROWSER=wslview'. wslview is a WSL browser emulator that can help you open links in the default Windows browser or open files on Windows from WSL. The utility is pre-installed by default when using the latest Ubuntu releases on WSL but can also be added/updated on other Linux distros by installing wslu which provides a collection of utilities for Windows 10 Linux Subsystem. Refer to the Github repository at wslu - A collection of utilities for WSL for the installation instructions applicable to your WSL Linux environment. |
Live Server does not work in WSL 2. When I click on "Go Live", the browser does not open. If I access through the browser by entering the address http://127.0.0.1:5500/, it doesn't open either.
Under Windows 10 without WSL2, clicking on "Go Live" automatically opens the browser.
Is there a way to fix it?
The text was updated successfully, but these errors were encountered: