I’m creating a nextjs@14 project with prismadb and react. I’ve defined the category model in schema.prisma file as seen like this:
model Category {
// ...values
// ...values
}
when trying to access the value of the model with ‘findMany’
const categories = await prismadb.category.findMany({
where: {
// ...values
// ...values
}
})
i get this error for the category word:
Property ‘category’ does not exist on type ‘PrismaClient<PrismaClientOptions, never, DefaultArgs>’.ts(2339)
tried the following recommendations:
- npx prisma generate
- npx prisma db push
- restart vscode
- reload vscode window
any idea on how to fix this?