question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Live server is not possible without body or head tag

See original GitHub issue

HI! I tried running live server on my vscode today and I keep getting the prompt "live server is not possible without body or head tag. I ran the same live server yesterday and it worked fine. What can be done about it please?

I’m submitting a…

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

Expected behavior

Environment

Browser:

- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: <!-- Check which version is installed --> 
- Platform:  <!-- Mac, Linux, Windows -->
- Visual Studio Code: <!-- `code --version` -->

Others

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ritwickdeycommented, May 5, 2022

Hey, it means your html doesn’t have <body> or <head> tag.

Can you show me a full screenshot of vscode window?

1reaction
ritwickdeycommented, May 5, 2022

Please create a file and paste this HTML.

<!DOCTYPE html>
<html lang="en">
  <head></head>
  <body>
    Hello World
  </body>
</html>

Now try to open the file using Live Server. It should not give that warning message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Live Reload is not possible as body or head tag or defined ...
It is because you have made a media query on your file and your display screen/window is in that size, and since you...
Read more >
Live Reload is not possible without body or head tag
remove the title "Document" from your code and the live reload will work just fine. Worked for me.
Read more >
Visual Studio Code Live Reload - Super User
I am testing an html file and I need to reload upon save. I've seen many tutorials update the view of an html...
Read more >
Live Reload is not possible without body or head tag.
Live Reload is not possible without body or head tag. ... I am facing this issue whenever I make same changes in my...
Read more >
live reload is not possible without a head or body tag. what is ...
I tried turning off the live server extension and opened it in the browser from the HTML file directly and nothing changed. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found