Skip to content
Discussion options

You must be logged in to vote

Hi @simibruda 👋

Thank you for raising this question.

How did you define your postinstall script? Does it look like the below:

// Make sure your postinstall script in package.json correctly generates both Prisma clients. 

"postinstall": "prisma generate --schema prisma/schema1.prisma && prisma generate --schema prisma/schema2.prisma"

Are you also correctly importing the Prisma Client? You will need to change the import path from

import { PrismaClient } from '@prisma/client'

to

import { PrismaClient } from '../prisma/generated/xxxx' where xxxx represents any path you're using.

You may also want to take a look at this workaround described in this similar issue.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simibruda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants