I was working with Prisma and NestJS and it is fine but when I updated Prisma to version 7 I started getting errors, fixed them, but I am stuck with this one.
Part of schema:
datasource db { provider = "postgresql" } generator client { provider = env("CLIENT_PROVIDER") } model User { userId Int @id @default(autoincrement()) @map("user_id") name String email String @unique password String status String @default("ACTIVE") isSuperAdmin Boolean @default(false) @map("is_super_admin") createdAt DateTime @default(now()) @map("created_at") otps Otp[] auditLogs AuditLog[] @@map("users") @@index([name]) } Prisma service:
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '@prisma/client'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { async onModuleInit() { await this.$connect(); } async onModuleDestroy() { await this.$disconnect(); } } Prisma module:
import { Global, Module } from '@nestjs/common'; import { PrismaService } from './prisma.service'; @Global() @Module({ providers: [PrismaService], exports: [PrismaService], }) export class PrismaModule {} Prisma config:
import { defineConfig, env } from "@prisma/config"; import dotenv from "dotenv"; import path from "path"; dotenv.config({ path: path.resolve(process.cwd(), ".env") }); export default defineConfig({ schema: "src/shared/database/prisma/schema.prisma", datasource: { url: env("DATABASE_URL"), }, }); and the error:
npm run start > [email protected] start > nest start (node:127213) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated. (Use `node --trace-deprecation ...` to show where the warning was created) [Nest] 127247 - 11/23/2025, 1:56:22 PM LOG [NestFactory] Starting Nest application... [Nest] 127247 - 11/23/2025, 1:56:22 PM ERROR [ExceptionHandler] TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received undefined