Closed pauldb09 closed 2 years ago
It appears that you are attempting to parse JSON from a response that isn't JSON so this isn't a library issue.
In my case basically the JSON was valid, but it's messy on some version of node. Broke on 16.17.0 but not in 16.16.0 when using petitio
In my case basically the JSON was valid, but it's messy on some version of node. Broke on 16.17.0 but not in 16.16.0 when using petitio
Experienced this same issue when trying to use petitio in Node version v16.18 when the JSON was valid. Was fixed by downgrading to v16.16.0 as the comment above mentions. Please fix and reopen this issue!
I can confirm this. A downgrade as mentioned above fixed the problem for me. However, it would be nice if it would also work in newer versions.
Environment
Node v16