omar-dulaimi / prisma-zod-generator

Prisma 2+ generator to emit Zod schemas from your Prisma schema
MIT License
535 stars 45 forks source link

Module not found: Can't resolve './BytesFieldRefInput.schema' #61

Closed nikkorejz closed 1 year ago

nikkorejz commented 1 year ago

Bug description

I have model in prisma. Reading, creation objects works fine. Zod schemas generated right.

// It works
import { MyModelCreateOneSchema } from "./database/prisma/generated/schemas/createOneMyModel.schema"

But when I attempting to import:

import { MyModelUpdateOneSchema } from "./database/prisma/generated/schemas/updateOneMyModel.schema"

I got error

../../packages/database/prisma/generated/schemas/objects/BytesFilter.schema.ts:2:0
Module not found: Can't resolve './BytesFieldRefInput.schema'
  1 | import { z } from "zod"
> 2 | import { BytesFieldRefInputObjectSchema } from "./BytesFieldRefInput.schema"
  3 | import { ListBytesFieldRefInputObjectSchema } from "./ListBytesFieldRefInput.schema"
  4 | import { NestedBytesFilterObjectSchema } from "./NestedBytesFilter.schema"
  5 | 

MyModel has relation to other models, one of this using Bytes

How to reproduce

Expected behavior

No response

Prisma information

Environment & setup

Prisma Version

4.7.1
omar-dulaimi commented 1 year ago

Hey @nikkorejz Could you share a small schema that does re-create your issue?

omar-dulaimi commented 1 year ago

Released in https://github.com/omar-dulaimi/prisma-zod-generator/releases/tag/0.8.11