vscode-live-server icon indicating copy to clipboard operation
vscode-live-server copied to clipboard

Live server not working on the vs code in ubuntu os

Open sammychinedu2ky opened this issue 6 years ago • 12 comments

Please I don't know why the live server isn't working on my operating system. When I click on the go live, my webpage opens in chrome but as I type on vs code and save nothing happens. Please what can I do?

sammychinedu2ky avatar Oct 20 '18 21:10 sammychinedu2ky

Hi @sammychinedu2ky - it's working fine for me in Ubuntu 18.04 with VS Code 1.28.2.
Try this: create a folder, open it in VS Code, create an index.html in it and put the very minimal HTML below in it and save it: <body>Hello World</body> Now right-click in the Explorer/Open with Live Server. You should see 'Hello World' in your browser of course. Now change the text in the body, that is, make it <body>Hello World Test</body> or something. Save it. You should see the new text in the browser without the need to explicitly refresh it. That works for me.

rich-newman avatar Nov 06 '18 16:11 rich-newman

Hi there,

First of my environment: Ubuntu 18 LTS Desktop + Code. Installed the extension Live Server. But nothing happened to my Code IDE. No Right click context menu added no icon in the status bar just nada. When I look at Code @installed there it is...

uninstalled it and reinstalled 3x

do we Linux users have to do something special, extra to get it up and running?

Also, I'm trying to get the chrome extension to work. I've got apache2 installed? Is there more documentation about how to, or a vid?

Thank you

denOldTimer avatar Jun 19 '19 13:06 denOldTimer

@denOldTimer There are instructions on Ritwick's Live Server page that should come up if you click the extension: try creating an HTML page and rightclicking it, or (Alt+L, alt+O), or type Live Server in the command palette (ctrl+shift+p). All that works for me in 18.04.1 LTS + VS Code 1.35.1

rich-newman avatar Jun 19 '19 18:06 rich-newman

I am also using ubuntu 18.04LTS + VS Code, It works once and i have to refresh my browser anytime a make and save changes in my document. Can you help me with that?

nightman19 avatar Nov 19 '19 15:11 nightman19

@nightman19 - Does that happen if you do the minimal thing in my answer from Nov 6, 2018 above? That still works fine for me, with repeated changes, in Ubuntu 18.04.3 LTS, VS Code 1.40.1, Live Server 5.6.1, Firefox 70.0.1.

rich-newman avatar Nov 19 '19 15:11 rich-newman

It doesn't work like it's suppose to. When I save from my code editor it doesn't automatically reload in the browser. I have to always go back to the browser and refresh it for the changes to appear. Will be very glad if there is a possible problem and fixing. Thank you

On 15:59, Tue, Nov 19, 2019 rich-newman <[email protected] wrote:

Does that happen if you do the minimal thing in my answer from Nov 6, 2018 above? That still works fine for me, with repeated changes, in Ubuntu 18.04.3 LTS, VS Code 1.40.1, Live Server 5.6.1, Firefox 70.0.1.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ritwickdey/vscode-live-server/issues/223?email_source=notifications&email_token=AL42JK2AG3COS4ACHYHFIIDQUQENBA5CNFSM4F6IS7V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEOWFDQ#issuecomment-555573902, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL42JKYVWLZ3CJC6HXFEX2LQUQENBANCNFSM4F6IS7VQ .

nightman19 avatar Dec 05 '19 07:12 nightman19

Check if 'auto save' is disabled in File -->Preferences --> Auto Save. If disabled, enable it and check.

Naveen2379 avatar Feb 23 '21 14:02 Naveen2379

Hi @sammychinedu2ky - it's working fine for me in Ubuntu 18.04 with VS Code 1.28.2. Try this: create a folder, open it in VS Code, create an index.html in it and put the very minimal HTML below in it and save it: <body>Hello World</body> Now right-click in the Explorer/Open with Live Server. You should see 'Hello World' in your browser of course. Now change the text in the body, that is, make it <body>Hello World Test</body> or something. Save it. You should see the new text in the browser without the need to explicitly refresh it. That works for me.

Thanks, thats worked.

EduardoBuzz avatar Apr 02 '21 03:04 EduardoBuzz

just go to extensions and search for live server and there in the setting of live server select your browser and it will work perfectly

gouranga2001 avatar Apr 18 '21 02:04 gouranga2001

@sammychinedu2ky click file section and enable auto save

asimmakhmudov avatar Jul 24 '21 10:07 asimmakhmudov

I just had to deal with the same issue.

In case it might help someone: Once you are operating VSCode out of WSL/Ubuntu, even if you already have the "Live Server" extension, open that extension and you should see a highlighted exclamation mark with the text "Install in WSL Ubuntu."

When you go back to your editor and click "run in live server", it will probably tell you there are missing libraries and ask if you want to install them / prompt your password. This took a couple minutes for me, no idea about your machine.

After that, when you click "run in live server", you may get a popup in VSCode saying "Server is started at port: 5500" (for example.) To navigate to that in your browser, use http://127.0.0.1:5500/ (or whatever that last number happens to be.)

HenrySpock avatar Dec 07 '21 18:12 HenrySpock

Hi guys, the problem is not the S.O. or the installation of the extension. The Live Server just reload the content inside the

tag. So, it will not work if you haven't a in your page.

danillofortuna avatar Sep 15 '22 22:09 danillofortuna

Hi there all, I'm on ubuntu desktop 22 and with the latest vscode. Live server works if you click twice on the index.html file. You got to click twice

denOldTimer avatar Oct 14 '22 12:10 denOldTimer

Thank you so much!

El mar, 7 dic 2021 a la(s) 11:31, MichaelT @.***) escribió:

I don't know if this was ever resolved, but I just had to deal with the same issue.

Once you are operating VSCode out of WSL/Ubuntu, even if you already have the "Live Server" extension, open that extension and you should see a highlighted exclamation mark with the text "Install in WSL Ubuntu."

When you go back to your editor and click "run in live server", it will probably tell you there are missing libraries and ask if you want to install them / prompt your password. This took a couple minutes for me, no idea about your machine.

After that, when you click "run in live server", you may get a popup in VSCode saying "Server is started at port: 5500" (for example.) To navigate to that in your browser, use http://127.0.0.1:5500/ (or whatever that last number happens to be.)

I hope this helps someone.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ritwickdey/vscode-live-server/issues/223#issuecomment-988170770, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMREOUPWKO2PP4LHZCYTSMLUPZHI3ANCNFSM4F6IS7VQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

EduardoBuzz avatar Oct 14 '22 19:10 EduardoBuzz

This extension used to work (Ubuntu 22.04). I had to do something else for 3-4 months and now that I am back, the Live Server (latest version, also latest version of VS Code) is not working. There is no indication that something actually happens. I created a very simple Hello World HTML file. Tried the context menu in the file explorer and the HTML file itself - nothing. The "Go Live" button in the status bar doesn't seem to do anything either. I tried even specifying both the web browser (default: null, meaning it will take the system default web browser) as well as the port (default: 0, meaning a random port every time) without any success.

aleksandaratanasov avatar Feb 07 '23 13:02 aleksandaratanasov