'npx prisma db seed' not responding

anyone have this issue where seeding the db does nothing and gets stuck? screenshot at the bottom of this post

this is my seed.ts

import { PrismaClient } from "@prisma/client";
import { hash } from "bcrypt";
const prisma = new PrismaClient();


export async function main(){
  const password = await hash('test', 123)
  const user = await prisma.user.upsert({
    where: {
      email: 'test@test.com'
    },
    update:{},
    create:{
      email: 'test@test.com',
      name: 'Test User',
      password: password
    }
  })

  console.log(user)
}

main()
  .then(() => prisma.$disconnect())
  .catch(async (e) => {
    console.error(e)
    await prisma.$disconnect()
    process.exit(1)
  })
image.png
Solution
oh i figured it out, you don't set the schema to password: password, you just say password
Was this page helpful?