Skip to content

ClsPluginModule Error #120

Answered by Papooch
PazminoJose asked this question in Q&A
Feb 3, 2024 · 2 comments · 6 replies
Discussion options

You must be logged in to vote

@PazminoJose Thank you for the reproduction, I have tried it locally and now I see where the problem is.

In your PrismaModule, you're providing the PrimsaService, which is an extended PrismaClient.
You pass PrismaClient as prismaInjectionToken to the TransactionalAdapterPrisma, but there is nothing provided under the PrismaClient injection token (which is the "argument t at index [0]").

So the fix to your problem is the following simple change:

 adapter: new TransactionalAdapterPrisma({
-  prismaInjectionToken: PrismaClient
+  prismaInjectionToken: PrismaService
 })

I'll go ahead and clarify it in the docs so it doesn't confuse people.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@PazminoJose
Comment options

@Papooch
Comment options

Answer selected by PazminoJose
@PazminoJose
Comment options

Comment options

You must be logged in to vote
3 replies
@PazminoJose
Comment options

@Papooch
Comment options

@OleksiiMandrichenko
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants