chrishoermann / zod-prisma-types

Generator creates zod types for your prisma models with advanced validation
Other
578 stars 43 forks source link

[BUG] prisma generate fails without log #253

Open AhmadHamid opened 1 month ago

AhmadHamid commented 1 month ago

Describe the bug After adding the zod generator to my Prisma schema, the prisma generate command fails without outputting any error. This is the case when using the provider zod-prisma-types and npx zod-prisma-types. When generating without the zod generator, the generation exits successfully.

$ npx prisma generate
Environment variables loaded from ../.env
Prisma schema loaded from schema.prisma
Error: Generator "zod-prisma-types" failed:

Package versions (please complete the following information):

Additional context

generator client {
  provider = "prisma-client-js"
}

generator zod {
  provider = "zod-prisma-types"
}

datasource db {
  provider = "sqlite"
  url      = env("DATABASE_URL")
}

model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  gender    String
  religion  String
  timestamp DateTime
  visits    Visit[]
}

model Visit {
  id        Int      @id @default(autoincrement())
  userId    Int
  user      User     @relation(fields: [userId], references: [id])
  timestamp DateTime
}