You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Already on GitHub?
Sign in
to your account
bug/0-unknown
Bug is new, does not have information for reproduction or reproduction could not be confirmed.
domain/client
Issue in the "Client" domain: Prisma Client, Prisma Studio etc.
kind/bug
A reported bug.
tech/typescript
Issue for tech TypeScript.
topic: client types
Types in Prisma Client
Bug description
Any version of Prisma greater than 4.12.0 that I tried (4.13.0 and 5.5.2 for sure) produce the following error:
Generate the client and build the application. The source files are sensitive and I did not yet have the opportunity to invest time shrinking to produce a minimal example that exposes the bug.
Expected behavior
Compile without errors.
Prisma information
datasourcedb {provider="postgresql"url=env("POSTGRES_URI")generatorclient {provider="prisma-client-js"output="./dist"previewFeatures=["tracing"]// [...] sensitive and I did not yet have the opportunity to invest time shrinking to produce a minimal example that exposes the bug
// [...] sensitive and I did not yet have the opportunity to invest time shrinking to produce a minimal example that exposes the bug
The bug is present in 4.13.0 and 5.5.2. I have not tested all versions in between, but I believe all are affected. The bug is absent from version 4.12.0.
Are you sure you are using a recent version of Typescript?
Yes, as explicitly stated in the issue description:
I reproduced the issue with TS 4.7.4, 5.0.0, and 5.2.2, so it is not a matter of using an old TS version as reported in related issues (see below).
bug/0-unknown
Bug is new, does not have information for reproduction or reproduction could not be confirmed.
and removed
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
labels
Oct 31, 2023
@mitre-tm without more information to be able to reproduce, we won't be able to help here.
Please give steps to reproduce (the exact command and tooling versions) along with your tsconfig.json file for example.
I just tried the following with 5.5.2 and everything works as expected.
I solved the issue by deleting the lockfiles (package-lock.json) and recreating them with npm install. In this process, some dependencies were auto-updated, which I believe solved the issue. In the build (CI), we use npm clean-install, for reproducibility and security.
By the way, our tsconfig.json was already consistent with the one provided in the example, with the difference that target was set to ES2022, as recommended for Node 18.
@brooke1220 Please open a new issue and fill up the template, we'll need more information to be able to help you.
Make sure to check your typescript package version installed.
I solved the issue by deleting the lockfiles (package-lock.json) and recreating them with npm install. In this process, some dependencies were auto-updated, which I believe solved the issue. In the build (CI), we use npm clean-install, for reproducibility and security.
By the way, our tsconfig.json was already consistent with the one provided in the example, with the difference that target was set to ES2022, as recommended for Node 18.
thank you bro, you solved my problem, i love you
bug/0-unknownBug is new, does not have information for reproduction or reproduction could not be confirmed.domain/clientIssue in the "Client" domain: Prisma Client, Prisma Studio etc.kind/bugA reported bug.tech/typescriptIssue for tech TypeScript.topic: client typesTypes in Prisma Client