I get this from a server I tried to run with bun instead of node:
252 | if (results.accu.code == 200)
253 |
254 | data.accu = JSON.parse(results.accu.data);
^
SyntaxError: JSON Parse error: Unrecognized token 'ߋ'
Any idea what can be the reason? Is it a bun bug? It always worked fine with nodejs
I consolelogged the contents of body, and it looks like valid JSON, no weird characters.
I believe it could be related to the request api, actually, which is where body comes from:
const request = require('request');