Syntax Error in Angular App: Unexpected token <

Discussão em 'Angular' iniciado por Gerardo Tarragona, Outubro 18, 2024.

  1. I have an Angular app which runs perfectly in my local and production environment.. After a tiny change I made, I ran the app locally and it works fine.. Then I built the project and copied the dist folder to the web server. The problem is when I try to access to the app I get the following error in the Chrome Inspector:

    Uncaught SyntaxError: Unexpected token < inline.1a152b6….bundle.js:1
    Uncaught SyntaxError: Unexpected token < polyfills.1553fdd….bundle.js:1
    Uncaught SyntaxError: Unexpected token < vendor.94d0113….bundle.js:1
    Uncaught SyntaxError: Unexpected token < main.d6f56a1….bundle.js:1


    So, it seems like it is a misplaced character but in my local environment the app works fine I don't get any warning or error message on the console..

    Continue reading...

Compartilhe esta Página