Title: Error Uncaught SyntaxError: Unexpected identifier
Last modified: February 7, 2021

---

# Error Uncaught SyntaxError: Unexpected identifier

 *  Resolved [Domantas Gudeliauskas](https://wordpress.org/support/users/domantasgudeliauskas/)
 * (@domantasgudeliauskas)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/)
 * Hello,
 * I use Autoptimize + Async JavaScript.
 * A week ago I noticed an error `Error Uncaught SyntaxError: Unexpected identifier`
   in Console. [https://prnt.sc/ynz7pi](https://prnt.sc/ynz7pi)
 * I tried changing Autoptimize and Async JavaScript settings, excluding JS files
   without any luck.
 * I am pretty sure the Async JavaScript plugin is causing it because if I uncheck“
   Enable Async JavaScript?” there is no error in console.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-uncaught-syntaxerror-unexpected-identifier%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14015591)
 * in that case try excluding one of below strings in Async JS and see which one
   helps, based on that we can see what the next step(s) could be.
 * * `wp-content/plugins`
    * OR `wp-content/themes` * OR `wp-includes/js`
 *  Thread Starter [Domantas Gudeliauskas](https://wordpress.org/support/users/domantasgudeliauskas/)
 * (@domantasgudeliauskas)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14028968)
 * Hey,
 * Not sure if it’s a correct way to exclude scripts: [https://prnt.sc/yxxlpc](https://prnt.sc/yxxlpc)
   but it did not work, still getting the same error.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14029344)
 * OK, let’s take a step back: do things work if you disable AsyncJS (and leave 
   AO active)?
 *  Thread Starter [Domantas Gudeliauskas](https://wordpress.org/support/users/domantasgudeliauskas/)
 * (@domantasgudeliauskas)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14069888)
 * yes, I don’t get any errors if I disable AsyncJS and keep AO
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14070121)
 * OK, can you try adding `omappapi.com` to the exclusion list?
 *  Thread Starter [Domantas Gudeliauskas](https://wordpress.org/support/users/domantasgudeliauskas/)
 * (@domantasgudeliauskas)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14072525)
 * Hey,
 * Thanks, it fixed the error.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14072561)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/async-javascript/reviews/#new-post)!
   🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Error Uncaught SyntaxError: Unexpected identifier’ is closed to new replies.

 * ![](https://ps.w.org/async-javascript/assets/icon-128x128.png?rev=1839260)
 * [Async JavaScript](https://wordpress.org/plugins/async-javascript/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/async-javascript/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/async-javascript/)
 * [Active Topics](https://wordpress.org/support/plugin/async-javascript/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/async-javascript/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/async-javascript/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/error-uncaught-syntaxerror-unexpected-identifier/#post-14072561)
 * Status: resolved