JSON Parsing, TRPC Client error

I have a project with various trcp endpoints on nextjs 13.5 and they are working fine on development, but when deploying to vercel i get this strange error of a non-whitespace character on all the GET operations: [next-auth][error][CREATE_USER_EVENT_ERROR] https://next-auth.js.org/errors#create_user_event_error Unexpected non-whitespace character after JSON at position 4 { message: 'Unexpected non-whitespace character after JSON at position 4', stack: 'TRPCClientError: Unexpected non-whitespace character after JSON at position 4\n' + ' at TRPCClientError.from (/var/task/.next/server/chunks/5.js:39:117279)\n' + ' at /var/task/.next/server/chunks/5.js:39:122357\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)', name: 'TRPCClientError' }  << query  #1 entities.getAll  { input: undefined, result: TRPCClientError: Unexpected non-whitespace character after JSON at position 4 at TRPCClientError.from (/var/task/.next/server/chunks/5.js:39:117279) at /var/task/.next/server/chunks/5.js:39:122357 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { meta: undefined, shape: undefined, data: undefined, [cause]: SyntaxError: Unexpected non-whitespace character after JSON at position 4 at JSON.parse (<anonymous>) at parse (/var/task/.next/server/chunks/5.js:43:4667) at /var/task/.next/server/chunks/5.js:43:3830 at onChunk (/var/task/.next/server/chunks/5.js:43:3983) at readStandardChunks (/var/task/.next/server/chunks/5.js:43:4254) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async readLines (/var/task/.next/server/chunks/5.js:43:4064) at async parseJSONStream (/var/task/.next/server/chunks/5.js:43:3670) }, elapsedMs: 145 } The connection with the db is working fine, so I can't seem to find the problem.
Errors | NextAuth.js
This is a list of errors output from NextAuth.js.
2 Replies
Cobain
CobainOP14mo ago
Ok, that fixed it. Thanks! Totally random
Want results from more Discord servers?
Add your server