Today I added transformer.js into my Angular webapp. Locally on dev server everything runs perfectly without any issues. But when I build it using “ng build” and deploy it on Firebase, I get this strange error:
main.fbc608241a904832.js:1 ERROR Error: Uncaught (in promise): SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON (at polyfills.4a1e51706d719e32.js:1:15924)
In my opinion, it looks like the build failed. BTW: I am using Angular 15 and ng build doesnt finish and the terminal is stuck. But it always created the build and I could deploy it anyway.
Do you have any idea how I could fix this?