ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.75k stars 1.26k forks source link

Live server not working on the vs code in ubuntu os #223

Open sammychinedu2ky opened 6 years ago

sammychinedu2ky commented 6 years ago

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?

rich-newman commented 5 years ago

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.

denOldTimer commented 5 years ago

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

rich-newman commented 5 years ago

@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

nightman19 commented 4 years ago

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?

rich-newman commented 4 years ago

@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.

nightman19 commented 4 years ago

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 <notifications@github.com 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 .

Naveen2379 commented 3 years ago

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

EduardoBuzz commented 3 years ago

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.

gouranga2001 commented 3 years ago

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

asimmakhmudov commented 3 years ago

@sammychinedu2ky click file section and enable auto save

HenrySpock commented 2 years ago

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.)

danillofortuna commented 2 years ago

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.

denOldTimer commented 2 years ago

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

EduardoBuzz commented 2 years ago

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.

aleksandaratanasov commented 1 year ago

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.