TARIQ ALREHILY14,822 Points
I am getting this on my Machine Terminal!!
SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at IncomingMessage.response.on (/Users/tariqalrehily/Desktop/Command_Line_Application/app.js:25:52) at IncomingMessage.emit (events.js:187:15) at endReadableNT (_stream_readable.js:1098:12) at process.internalTickCallback (internal/process/next_tick.js:72:19)
So, after a little googling, It seems that that particular response is saying that your trying to parse something that ISNT JSON. From the article I read, the "<" is a strong indicator that you are getting HTML data rather than valid JSON. The root cause is that the server returned HTML or some other non-JSON string. To see what is wrong, you can use console.log. With out the code, its hard to know exactly whats going on. Here is the link to the article I read. https://daveceddia.com/unexpected-token-in-json-at-position-0/