Invocation of prisma failing in staging deployment
I have upgraded both prisma and @prisma/client to v 6.16.1 , set it up correctly following the docs and everything is working fine in development but in staging environment.
For context I have a :
monorepo set up with turborepo,
api directory under apps/api, nest.js with graphql ,
local db using postgres with docker
staging api deployed to render using prisma postgres as staging db
On render :
build command : pnpm install --frozen-lockfile && prisma generate && nest build
start command : cd apps/api && prisma db push && node dist/src/main
the deployment is successful and the the client is generated as expected, but can't make any query or mutation. For instance trying to query countries as per mys schema would throw an error :Invalid this.db.country.findMany() invocation in /opt/render/project/src/apps/api/dist/src/countries/countries.service.js:105:42 102 meanwhile I have no issue locally. Not sure what I am missing.
NOTE: everything was working fine both locally and in staging , I just updated my client generation logic to use rust-free, upgraded prisma and prisma client dependencies, added pg adpater, modified my database service and manually updated the path to import PrismaClient, models, enums types from the generated folder located under apps/api/src/generated
For context I have a :
monorepo set up with turborepo,
api directory under apps/api, nest.js with graphql ,
local db using postgres with docker
staging api deployed to render using prisma postgres as staging db
On render :
build command : pnpm install --frozen-lockfile && prisma generate && nest build
start command : cd apps/api && prisma db push && node dist/src/main
the deployment is successful and the the client is generated as expected, but can't make any query or mutation. For instance trying to query countries as per mys schema would throw an error :Invalid this.db.country.findMany() invocation in /opt/render/project/src/apps/api/dist/src/countries/countries.service.js:105:42 102 meanwhile I have no issue locally. Not sure what I am missing.
NOTE: everything was working fine both locally and in staging , I just updated my client generation logic to use rust-free, upgraded prisma and prisma client dependencies, added pg adpater, modified my database service and manually updated the path to import PrismaClient, models, enums types from the generated folder located under apps/api/src/generated