So I am using Prisma for the first time and my provider is mongodb and when I want to create a model it throws me an error
Invalid `prisma.user.create()` invocation:
Prisma needs to perform transactions, which requires your MongoDB server to be run
as a replica set. https://pris.ly/d/mongodb-replica-set
I am using Prisma in a nextjs app and I put the code inside the API pages
My DATABASE_URL is mongodb://localhost:27017/threadzees
Code :
await prisma.user.create({
data: {
username,
email,
avatar: "1",
createdAt: new Date(),
},
});
How do I fix this issue?