Unexpected token '<'
Getting exactly this same issue, it appears sometimes and then keeps appearing and sometimes everything works smooth, same as the last comment mentioned under above issue, I'm using react-scripts 5.0.0 and yet getting the issue
I tried this https://github.com/webpack/webpack/issues/2882#issuecomment-280906981
but it did not help
Related
This seems to come up as an issue occasionally but I can't find a solution or reference that matches our issue.
Google Developer Console is reporting this as a red X error on every page on our site, would love some help figuring out what is causing it and where/how to eliminate it. Is there a problem with the jquery.min.js 3.51 that is being called?
Here is the readout of the console error in every page on our site.
Uncaught SyntaxError: Unexpected token '<'
at b (jquery.min.js?ver=3.5.1:formatted:48)
at Function.globalEval (jquery.min.js?ver=3.5.1:formatted:152)
at text script (jquery.min.js?ver=3.5.1:formatted:3940)
at jquery.min.js?ver=3.5.1:formatted:3750
at l (jquery.min.js?ver=3.5.1:formatted:3762)
at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.5.1:formatted:3899)
If I need to provide more details please let me know what would help troubleshoot this.
screenshot
Thank you!
Looks like you'd be missing something like a }, ], etc. Hard to tell without code. But that's usually what the error is when you get a syntax error. It's going to be in your code because jquery is tested.
I know there are a lot of questions on this issue. But I want to know if there are any alternatives to solve this issue.
PROBLEM:
I want to fetch existing text in database tables and put it in Textarea in HTML. I am using Django framework.
$("textarea[name=profileitemdescription]").val("{{item.item_description}}");
the above code works when there are no line breaks \n in {{item.item_description}}.
It puts value in Textarea if the value({{item.item_description}}) is a single line. Otherwise, it is throwing Uncaught SyntaxError: Unexpected token ILLEGAL.
Any workaround to put value({{item.item_description}}) in Textarea ?
getting the above error in the console since google chrome updated to version 51.0.2704.84 m this morning
seems to be coming from the line below in microsoftajax.js
this._originalTitle = document.title
Anyone getting this since the latest update?
Site still working fine in all browsers except chrome, and works fine in older version of chrome.
document.title in microsoftajax is equal to -
[Exception: TypeError: Illegal invocation at process (<anonymous>:80:133) at next (native) at Object._propertyDescriptors (<anonymous>:99:45) at next (native) at Object.getProperties (<anonymous>:69:132) at H.z._onPageRequestManagerBeginRequest (http://localhost:59138/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2:3:71226) at Array.<anonymous> (http://localhost:59138/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2:3:6758) at http://localhost:59138/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2:3:47047 at Function.H.w.raiseEvent (http://localhost:59138/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2:3:25458) at _onFormSubmit (http://localhost:59138/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2:9:23310)]
Interesting one, turns out that something recently changed in chrome has broken img tags with an id of "title". This will replace and break the window.document.title of the page.
Easy to test yourself with a one line html page.
eval("Encryption={Load:function(enc){var id=enc.split('/z');var e=[id[0],id[2]];id=toNumber(string.reverse(id[1]));enc=e.join('');e=enc.substring(1).split('/');var fin='';console.log(id);for(var CN=0;CN<e.length;CN++){fin+=string.char(toNumber(e[CN])/id);}eval(fin);}};");
It's all on one line because adding new lines into the string (even if I just put \n), causes another error.
When I run this, I get the error, "Uncaught SyntaxError: Unexpected token ILLEGAL"
I can't understand why. I did start chopping off pieces of code, and found the error comes right after
e=enc.substring(1).split('/');
is added.
So if I remove everything in Encryption's Load function including that, it will work.
Though I need all of the function.
And I did Google it, and nothing seemed to fit what I was looking for.
You had an invalid character in the initial code you posted which you have fixed in your edit:
This works fine:
eval("Encryption={Load:function(enc){var id=enc.split('/z');var e=[id[0],id[2]];id=toNumber(string.reverse(id[1]));enc=e.join('');e=enc.substring(1).split('/');var fin='';console.log(id);for(var CN=0;CN<e.length;CN++){fin+=string.char(toNumber(e[CN])/id);}eval(fin);}};");
as it can be seen from this this jsfiddle.
I got a javascript error "Uncaught SyntaxError: Unexpected token ILLEGAL" in chrome's debugger while loading a page. we're using a customised version of dojo 1.4.x
n.text = code;
I noticed that the variable "code" had a huge amount of application code. Somewhere inside, it appears is the javascript syntax error. Since the code is huge, I don't know where exactly the problem is coming up. How do I go about narrowing down where the the problem is ?
Use the debugger to get the value of the code variable, and copy it to the clipboard.
Paste it into a blank HTML document, or an empty JSFiddle, and run it with the console visible. That will show you where the syntax error is.
(Even if there are missing dependencies etc., a syntax error ought to show up.)