zenstackhq / sample-todo-trpc

A complete Todo app sample built with ZenStack, tRPC, and Next.js
https://zenstack-todo-trpc.vercel.app
23 stars 2 forks source link

Getting Error when trying to build #1

Open SushiWaUmai opened 1 year ago

SushiWaUmai commented 1 year ago

When I try to build this project I get the following error:

āœ” Running plugin Prisma
āœ” Running plugin Model Metadata
āœ” Running plugin Access Policy
āœ” Running plugin tRPC

šŸ‘» All plugins completed successfully!
info  - Loaded env from /home/eugene/coding/hobby/ts/cloned/sample-todo-trpc/.env
info  - Linting and checking validity of types ...Failed to compile.

./server/routers/generated/schemas/objects/ListCreateOrConnectWithoutOwnerInput.schema.ts:9:7
Type error: Type 'ZodObject<{ where: ZodLazy<ZodType<Omit<ListWhereUniqueInput, "zenstack_transaction" | "zenstack_guard">, ZodTypeDef, Omit<ListWhereUniqueInput, "zenstack_transaction" | "zenstack_guard">>>; create: ZodUnion<...>; }, "strict", ZodTypeAny, { ...; }, { ...; }>' is not assignable to type 'ZodType<Omit<ListCreateOrConnectWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">, ZodTypeDef, Omit<ListCreateOrConnectWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">>'.
  The types of '_type.create' are incompatible between these types.
    Type '(Omit<ListCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard"> | Omit<ListUncheckedCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">) & (Omit<...> | ... 1 more ... | undefined)' is not assignable to type '(Without<ListCreateWithoutOwnerInput, ListUncheckedCreateWithoutOwnerInput> & ListUncheckedCreateWithoutOwnerInput) | (Without<...> &
ListCreateWithoutOwnerInput)'.
      Type 'Omit<ListCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard"> & Omit<ListUncheckedCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">' is not assignable to type '(Without<ListCreateWithoutOwnerInput, ListUncheckedCreateWithoutOwnerInput> & ListUncheckedCreateWithoutOwnerInput) | (Without<...> & ListCreateWithoutOwnerInput)'.
        Type 'Omit<ListCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard"> & Omit<ListUncheckedCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">' is not assignable to type 'Without<ListUncheckedCreateWithoutOwnerInput, ListCreateWithoutOwnerInput> & ListCreateWithoutOwnerInput'.
          Type 'Omit<ListCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard"> & Omit<ListUncheckedCreateWithoutOwnerInput, "zenstack_transaction" | "zenstack_guard">' is not assignable to type 'Without<ListUncheckedCreateWithoutOwnerInput, ListCreateWithoutOwnerInput>'.
            Types of property 'spaceId' are incompatible.
              Type 'string' is not assignable to type 'undefined'.

   7 | import type { Prisma } from '@prisma/client';
   8 |
>  9 | const Schema: z.ZodType<
     |       ^
  10 |   Omit<
  11 |     Prisma.ListCreateOrConnectWithoutOwnerInput,
  12 |     'zenstack_transaction' | 'zenstack_guard'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
SushiWaUmai commented 1 year ago

I assume something went wrong while generating the tRPC routes.