Uncaught SyntaxError: Unexpected token < is most commonly caused by your site’s code referring to an asset that is no longer available.
Let’s look at an example:
A file that was named
/assets/main-123abc.js would change to
/assets/main-456def.js – where there is a variable hash included in the filename. Your build tools may be doing that for you automatically even if you don’t intend for them to be.
In many cases, this is not a needed pattern on Netlify, since it is used for cache-busting. You can read more about how we handle caching in this thread and also in this article about our CDN’s caching.
If you are still experiencing problems and none of these solutions work, please start a new topic where you describe your specific situation, and mention that you have read this post already, so you don’t get sent back here