Quazar
Quazar
PPrisma
Created by Quazar on 4/19/2025 in #help-and-questions
Problem creating a new user to my database
Hello so I'm using prisma and nodejs but I'm facing a little issue when I try to create a new user into my db. The error arises from here:
import prisma from "@/lib/prisma";

const newUser = await prisma.user.create({
data: {
id: evt.data.id!,
email: primaryEmail.email_address,
isSubscribed: false, // Default setting
},
});
import prisma from "@/lib/prisma";

const newUser = await prisma.user.create({
data: {
id: evt.data.id!,
email: primaryEmail.email_address,
isSubscribed: false, // Default setting
},
});
it says: Property 'user' does not exist on type 'PrismaClient<PrismaClientOptions, never, DefaultArgs>'.ts(2339) However I do have a User model in my prisma.scheme file and I have run the commands to generate it as well npx prisma generate and npx prisma migrate
6 replies