We have deployed an angular SSR application using universal/express-engine in IIS in a sub domain. When we try to access the application, we have an intermittent issue. The files are loaded only partially and it is throwing the below error.
In Chrome :
Uncaught SyntaxError: Invalid or unexpected token
In FireFox :
Uncaught SyntaxError: "" literal not terminated before end of script
When I check the main.js file, the HTTP call is a success but I can see only ~63kb out of the 300kb file is loaded. Not sure why this is happening.
We have tried removing the IIS compression altogether, that does not seem to be the issue. We can see that the SSR loads the application like supposed but when the CSR loads we are facing this issue intermittently. When we redeploy, it works for the initial five-six times and then starts throwing the error.
We did not find any errors in the log, only a DeprecationWarning: Buffer() is deprecated due to security and usability issues
. Could that be causing the issue? We are not using it in our application it is used only in the external libraries.
Has anyone faced a similar issue before? Any help is appreciated
Thanks in advance :)