One of my NodeJS / ExpressJS app gets quite from time to time by the error:
SyntaxError: Unexpected end of input
at parse (native)
Unfortunately there is no line number and no stack. The hole project is based on typescript and compiles just fine. The process is running on a PM2.
Any idea how to hunt down this error?
Regards and thx...
Search your app source code for
JSON.parse, then find if any of the input your are getting is a proper JSON. I suspect you are getting HTML page as a response for one of your requests (due to404or5xx) To track down the error: