It seems to me the error message is pretty obvious: there are JavaScript syntax errors being encountered, presumably from your code.
Run your code through JSLint/JSHint to find some of these problems. If you have a large project, then a tool like LintRoller might help.