Why am I getting this error in the web console? It just says “line 1, col 1” with that error. When I click the link, I’m brought to the source of my homepage, and it’s telling me it didn’t expect the < in the doctype!
(For SEO: opening angle bracket, less than sign)
In my case, I was using a javascript library and loading a theme file as part of the configuration. I misspelled the path to the file, which is what caused all of this. Why didn’t it give me a better error message? Because I have my website set up to redirect all 404s to the homepage. So it tried to interpret my homepage HTML as the js theme file.
If you get a strange error like this, there’s a good chance that you just made a typo.
If you redirect 404s to the homepage, it would probably be a good idea to disable it during development.