1

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)

1
  • 1
    How is this too localized? This very cryptic error message has a simple explanation in the case where any 404 is redirected to the home page, and I'm sure I'm not the first one to do that. Commented Aug 30, 2012 at 21:18

3 Answers 3

2

TL;DR

check bad path to file.js

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

I don't know if this could help anyone as this is an old post. If you are using any Text Editor like Sub Lime there is great chance that use selected the tag from intellisense and the opening tag "<" that you first typed is still there.Check if you could find any.In this case review your DOCTYPE tag in the beginning of HTML

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.