prisma: [5.9.0 Bug] `Prisma.TransactionClient` appears to be missing types
Bug description
How to reproduce
Update client to latest 5.9.0 and rerun prisma generate
Expected behavior
No response
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
prisma : 5.9.0
@prisma/client : 5.9.0
Computed binaryTarget : darwin-arm64
Operating System : darwin
Architecture : arm64
Node.js : v20.11.0
Query Engine (Node-API) : libquery-engine 23fdc5965b1e05fc54e5f26ed3de66776b93de64 (at node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Schema Engine : schema-engine-cli 23fdc5965b1e05fc54e5f26ed3de66776b93de64 (at node_modules/@prisma/engines/schema-engine-darwin-arm64)
Schema Wasm : @prisma/prisma-schema-wasm 5.9.0-32.23fdc5965b1e05fc54e5f26ed3de66776b93de64
Default Engines Hash : 23fdc5965b1e05fc54e5f26ed3de66776b93de64
Studio : 0.497.0
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 9
- Comments: 18 (12 by maintainers)
Commits related to this issue
- Update legacy-importer tsconfig to fix prisma type imports https://github.com/prisma/prisma/issues/22870 — committed to GW2Treasures/gw2treasures.com by darthmaim 5 months ago
- fix(client): Fix "moduleResolution"="Node16",NodeNext or Bundler Fix #22870 — committed to prisma/prisma by SevInf 5 months ago
This currently causes no issues for me
Okay, yeah, on adding
I can confirm the lack of types š
indirection is not relevant
I can confirm that
5.10.0-integration-fix-nodenext.2works on my codebase, both in terms of type checking and the runtime.just change āmoduleResolutionā to ānodeā, works fine for me
https://github.com/prisma/prisma/releases/tag/5.9.1 is now available with the fix āØ
Please create a new issue if you find a bug.
My issue is still present even with
5.10.0-integration-fix-nodenext.2, I will create a reproduction later today@pheuter We are investigating this, we want to fix this in a patch release. Weāll keep you updated, and thanks for the report!
In the meantime, stay on
5.8.1, until we release5.9.1I understand that changing
moduleResolutionworks, but that shouldnāt be required, and works fine withmoduleResolution: "bundler"for Prisma 5.8.1. The latest version of SvelteKit requiresmoduleResolution: "bundler".Can also confirm that this causes types to be picked up for me š
Iāll reopen this for now. We will close it once we have the patch published on npm as
5.9.1later.I have
no(a very minimal)tsconfig.jsonin my local repro set up but I can immediately say that just switching frompostgrestomongodbmakes no difference to the generated types. Iāll try with the tsconfig now šWe use functions that add some indirection, so we have code like the following:
Can you confirm that the types still work when directly typing via
Prisma.TransactionClientinstead of letting the types flow from aprisma.$transaction()call?/cc @Druue