Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Example apps][Expo] Broken Prisma client generation #966

Closed
atanaskanchev opened this issue Feb 19, 2024 · 2 comments
Closed

[Example apps][Expo] Broken Prisma client generation #966

atanaskanchev opened this issue Feb 19, 2024 · 2 comments

Comments

@atanaskanchev
Copy link

atanaskanchev commented Feb 19, 2024

Steps to repro

  1. Clone the repo
  2. Update all the dependencies in the /examples/expo app to the latest and run expo doctor
  3. Update the pg and electric images to the latest
  4. Run
  • yarn backend:up
  • yarn db:migrate
  • yarn client:generate

Reproducible example

here

Expected

Prisma client to be generated in src/generated/client

Actual

  • The client generated in [src/generated/client/prismaClient.d.ts](https://github.com/electric-sql/electric/pull/965/commits/821493ab8cf61387718ce6bb69859dfebbe40354#diff-35095d33d6c46aeb1a1f607fde67e110ee08628ac2bc9eedc5005a02690d2fe6) has a broken import as import * as runtime from './runtime/library.js';
  • ts errors in the generated ItemsWhereUniqueInputSchema
Type 'ZodObject<{ value: ZodOptional; }, "strict", ZodTypeAny, { value?: string | undefined; }, { value?: string | undefined; }>' is not assignable to type 'ZodType'.
  Types of property '_type' are incompatible.
    Type '{ value?: string | undefined; }' is not assignable to type 'ItemsWhereUniqueInput'.
      Type '{ value?: string | undefined; }' is not assignable to type '{ value: string; } & { value?: string | undefined; AND?: ItemsWhereInput | ItemsWhereInput[] | undefined; OR?: ItemsWhereInput[] | undefined; NOT?: ItemsWhereInput | ... 1 more ... | undefined; }'.
        Type '{ value?: string | undefined; }' is not assignable to type '{ value: string; }'.
          Types of property 'value' are incompatible.
            Type 'string | undefined' is not assignable to type 'string'.
              Type 'undefined' is not assignable to type 'string'.ts(2322)
Copy link

linear bot commented Feb 19, 2024

@msfstef
Copy link
Contributor

msfstef commented Feb 28, 2024

Closing as duplicate of #1001 - see PR #1016 for progress on resolving this

@msfstef msfstef closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants