Prisma 7.2 + NestJS: PrismaClient requires PrismaClientOptions and error with adapter

I am trying to use Prisma 7.2 with NestJS in a Node 22 project running inside Docker, but I am running into errors when intsantiating the PrismaClient. My current PrismaService looks like this:

import { Injectable, OnModuleInit, OnModuleDestroy } from ‘@nestjsnestjs/common’;

import { PrismaClient } @prismarom ‘@prism@Injectable/client’;

@Injectable()

export class PrismaService

extends PrismaClient

implements OnModuleInit, OnModuleDestroy

{

constructor() {

super();


}

async onModuleInit() {

await this.$connect();


}

async onModuleDestroy() {

await this.$disconnect();


}

}

When I try to run the NestJS application, I get the following error:

PrismaClientInitializationError: `PrismaClient` needs to be constructed with a non-empty, valid `PrismaClientOptions`:

new PrismaClient({

…

})

or

constructor() {

super({ … });

}

-–

What I have already tried:

1. Passing adapter in super(), as in older documentation:

super({ adapter: ‘postgresql’ });

The error that occurred:

Type ‘string’ is not assignable to type ‘SqlDriverAdapterFactory’

2. Trying to import P@prismastgresqlAdapter from prisma/client/runtime:

import @prisma PostgresqlAdapter } from ‘prisma/client/runtime’;

super({ adapter: PostgresqlAdapter() });

The error that occurred:

Cannot find module ‘@prisma/client/runtime’ or its corresponding type declarations

3. Calling just super() without parameters → triggers the PrismaClientInitializationError shown above.

Environment details:

Prisma version: 7.2.0

Node: 22

NestJS: latest version

Database: Postgres running in Docker (docker-compose)

I am using the new “client” engine type of Prisma 7, so I cannot use url in the schema.prisma.

Can you tell more about why you think it is a Docker issue? I get that you are using Docker, but I see no Docker-related error messages or anything related to using Docker.

In many cases when users run into module loading errors, they incorrectly configure the the interpreter, save their files into the wrong directory or run the command in the wrong directory. The latter could be caused by an incorrect WORKDIR which can be set in a Dockerfile or when creating the container (even in compose files).

If you think it is a Docker issue, please, share files and commands that allow us to reproduce the issue.