Before I do npm install @prisma/client I get an error:
Cannot find module '@prisma/client' or its corresponding type declarations.ts(2307)
in the code below
import { Injectable, OnModuleInit } from '@nestjs/common';
import { PrismaClient } from '@prisma/client';
@Injectable()
export class DatabaseService extends PrismaClient implements OnModuleInit {
async onModuleInit() {
await this.$connect();
}
}
After the installation of @prisma/client I get an error
ERROR [ExceptionHandler] @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
Thanks in Advance.
I tried to install @prisma/client package