Error occurring on all pages except home only on production server Uncaught SyntaxError: Unexpected token <
Using Angular CLI version (1.6.0)
Local build works fine loading both the localhost:4200 navigating to any page works and loading directly localhost:4200/[viewcomponent].
As soon as I push it live: The base url works and navigating to other pages works as well however Loading a page directly gives the following error:
inline.7188b140d50c544cd4d6.bundle.js:1
Uncaught SyntaxError: Unexpected token <
polyfills.900aaf0d520c2ec873a7.bundle.js:1
Uncaught ReferenceError: webpackJsonp is not defined
vendor.945e35d73f0e55b0c5f4.bundle.js:1
Uncaught SyntaxError: Unexpected token <
main.bd9155fd1f2baada6b7b.bundle.js:1
Uncaught SyntaxError: Unexpected token <
Did you check what's the actual data served by your web server? I usually have that error when my redirect rules are sending the index page instead of the javascript.
I agree with the assessment by @MaximeMorin here. Please check your web server's redirect settings.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.