hello, I'm using Prisma version 2.25 and Node vers...
# orm-help
d
hello, I'm using Prisma version 2.25 and Node version 16.17 and I randomly started getting an error yesterday, it was working fine the day before and I havn't updated anything.
Copy code
10:39:53 api-service | SyntaxError: Unexpected end of JSON input
10:39:53 api-service |     at JSON.parse (<anonymous>)
10:39:53 api-service |     at /Users/XXX/WorkSpace/XXX/node_modules/@prisma/client/runtime/index.js:27224:31
10:39:53 api-service |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
I have turned on the debug mode and the queries it seems to be generating look fine to me. Filling in the $1.. with the actual data and running the query directly on the DB returns expected results. Is there any thing else I can do to try and figure out what is causing this error?
1
n
Hey Derrick 👋 Can you try using Node version 16.16? I was able to find a related GitHub Issue: #14834 I am referring to this comment. Using Node version 16.16 solved the issue for them. It appears Node updated its JSON escape sequences to align with the JSON spec (
\v
, specifically) and v2 of Prisma seems to reference that escape sequence in its code.
👍 1
d
yeah, i just tried that this morning and just getting back to here. Thank you! The fix is def going back to node 16.16
🙌 1