This is the error message I got in the terminal: "TypeError: The "payload" argument must be of type object. Received null"
I am trying to fetch user
data like so:
const user = await prisma.user.findMany({
orderBy: {
id: 'desc'
}
});
This is the error message I got in the terminal: "TypeError: The "payload" argument must be of type object. Received null"
I am trying to fetch user
data like so:
const user = await prisma.user.findMany({
orderBy: {
id: 'desc'
}
});
2
Answers
The solution was to import
PrismaClient
from@prisma/client
instead of@prisma/client/edge
.import { PrismaClient } from '@prisma/client';
Got the same error today. but I am using
@prisma/client
already.Guess this issue is related tonextjs 15
. Can anyone help?