fix PrismaClient constructor: pass empty object (required prisma v7)

This commit is contained in:
Lizandro Guarnizo
2026-06-03 22:51:03 -05:00
parent 5db8b0a131
commit 41bcf31428
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
COPY . . COPY . .
RUN npx prisma generate && npm run build RUN npx prisma generate
RUN npm run build
FROM node:22-alpine AS runner FROM node:22-alpine AS runner
WORKDIR /app WORKDIR /app
+1 -1
View File
@@ -4,7 +4,7 @@ import { PrismaClient } from '@prisma/client';
@Injectable() @Injectable()
export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy {
constructor() { constructor() {
super({ datasources: { db: { url: process.env.DATABASE_URL } } }); super({});
} }
async onModuleInit() { async onModuleInit() {