Skip to content
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

Document requirement for body tag #341

Open
bibhas2 opened this issue Feb 13, 2020 · 2 comments
Open

Document requirement for body tag #341

bibhas2 opened this issue Feb 13, 2020 · 2 comments

Comments

@bibhas2
Copy link

bibhas2 commented Feb 13, 2020

Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting

Issue description

live-server requires that body tag be present in the HTML. This should be documented clearly. Granted most web pages will have body tag. Still it will be a good idea to document it.

Software details

  • Command line used for launching live-server: live-server
  • OS: Mac-OS
  • Browser (if browser related): Chrome
  • Node.js version: v11.5.0
  • live-server version: 1.2.1
@shreevatsa
Copy link

I ran into this! I was lazy, had an index.html like

<!DOCTYPE html>

<p>Hello</p>

and so on, and live-reload mysteriously wasn't working.

In fact, rather than documenting the requirement (must have either body or head or svg), it would be nice if there's an error message printed.

Actually, when I run live-server --verbose such an error message is printed:

Failed to inject refresh script! Couldn't find any of the tags  [ /<\/body>/i, /<\/svg>/, /<\/head>/i ] from /path/to/bad.html

so it would be nice if this (important!) error message is printed even without --verbose.

@gdw2
Copy link

gdw2 commented Dec 11, 2020

This PR might help: #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants