“SyntaxError: Unexpected token < in JSON at position 0”

前端 未结 30 1515
花落未央
花落未央 2020-11-22 04:39

In a React app component which handles Facebook-like content feeds, I am running into an error:

Feed.js:94 undefined \"parsererror\" \"SyntaxError: Un

30条回答
  •  名媛妹妹
    2020-11-22 05:36

    In my case (backend), I was using res.send(token);

    Everything got fixed when I changed to res.send(data);

    You may want to check this if everything is working and posting as intended, but the error keeps popping up in your front-end.

提交回复
热议问题