I had the same error, but in my case the problem was an unclosed // <!CDATA[ section in my code. Closing the section fixed the error.
// <!CDATA[