Open bibhas2 opened 4 years ago
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
.
This PR might help: https://github.com/tapio/live-server/pull/217
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 havebody
tag. Still it will be a good idea to document it.Software details
live-server
: live-serverlive-server
version: 1.2.1