#[TypeError: The "payload" argument must be of type object. Received null]
7 messages · Page 1 of 1 (latest)
Here is my app:
Based on the information provided in the knowledge sources, it appears that you're encountering a known issue related to Next.js and Prisma. This error is not directly related to your Prisma schema, but rather to how Next.js handles stack traces and source maps after upgrading.
The error message "TypeError: The "payload" argument must be of type object. Received null" is actually coming from the console.log() function, not from Prisma itself. This issue has been reported and discussed in several GitHub issues.
Here are a few potential solutions and workarounds:
-
As suggested in this GitHub issue, you can try removing the line
//# sourceMappingURL=library.js.mapfromnode_modules/@prisma/client/runtime/library.jsas a temporary workaround. -
Make sure that both your Prisma CLI and Prisma Client are updated to the same version. As mentioned in another GitHub issue, having mismatched versions can cause similar errors.
-
If you're using TypeScript, updating to a newer version might help. In this GitHub discussion, updating TypeScript from version 4.5.5 to 5.2.2 resolved a similar error.
If these solutions don't work, you may need to provide more details about your setup, including your exact Prisma and Next.js versions, and possibly a minimal reproduction of the issue.
Remember to always run prisma generate after upgrading Prisma or making changes to your schema.
If the problem persists, you might want to consider opening a new issue on the Prisma GitHub repository with a minimal reproduction of your specific case.
prisma:client Generated request: +1ms
prisma:client {
"modelName": "User",
"action": "findUnique",
"query": {
"arguments": {
"where": {
"id": "user_2k4mhHWHN8ueSCiVmEiwWV9YCX0"
}
},
"selection": {
"$composites": true,
"$scalars": true,
"passwordItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"cardItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"pinItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
},
"noteItems": {
"arguments": {},
"selection": {
"$composites": true,
"$scalars": true
}
}
}
}
}
+1ms
prisma:client:libraryEngine sending request, this.libraryStarted: false +4ms
prisma:client:request_handler {} +1ms
⨯ [TypeError: Cannot read properties of undefined (reading 'bind')] {
clientVersion: '5.22.0',
digest: '4055108486'
}
🤔 Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
Fixed the issue. had to regenerate / make sure prisma was the same version as @prisma/client