undefined:1 <!DOCTYPE html> ^ SyntaxError: Unexpected token < node.js

I left my app running when I went out and when I came back hours later the app had died with this message:

undefined:1
<!DOCTYPE html>
^
SyntaxError: Unexpected token <
    at Object.parse (native)
    at IncomingMessage.<anonymous> (/home/engine/private_js/N.app.js:35:296)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:919:16
    at process._tickCallback (node.js:419:13)

In app.js there are only 244 lines of code what kind of error is this I've not seen one like this before, google has nothing on it except a paste bin, I am sure it comes from deep in node.js

lol, server burp?

Without seeing any code, my guess is you're trying to JSON.parse() a response from a server, but it's returning HTML instead of JSON. You should check the response's content-type to make sure it is application/json before trying to parse the response.