I am not quite following what the problem is you describe.
If there are errors in the console then that should definitely be sorted out first. The error message you quoted contains no line numbers so I am not sure what it refers to. Have a look at this post, this is how error messages should look. If I do not get line numbers I will not know what part of the code is causing a problem.