Prisma client not generated during Go build in deployment environment (Choreo)

3 days ago 1
ARTICLE AD BOX

I am building a Go backend using Prisma (prisma-client-go)

Locally, everything works fine because I run the following command manually:

PRISMA_CLIENT_GO_BINARIES_ALL=true go run github.com/steebchen/prisma-client-go generate

However, when deploying the application to a cloud environment (WSO@ Choreo), the build process only runs:

go build

Because of this, the Prisma client is not generated, and database operations fail at runtime.

How can I ensure the Prisma client is generated during deployment or build time?

From my understanding. the deployement environment does not automatically run custom commands required for Prisma client generation.

My questions are:

What is the correct way to ensure Prisma client generation during deployment?

Is using a DOcker-based build process the recommand approach for this?

Are there alternative ways to integrate PRISMA generation into build lifecycle in Go application?

I would apperciate any guidence on best practices for handling this in production environments.

Read Entire Article