Prisma 7.0.1 : TypeError: Cannot read properties of undefined (reading '__internal')

2 weeks ago 363
ARTICLE AD BOX

I was using Prisma 6, and after upgrading to Prisma 7 I had to apply some changes to my schema.prisma. These changes include modifying the schema.prisma file and adding a new prisma.config.ts file.

My current schema.prisma looks like this:

generator client { provider = "prisma-client" output = "../src/generated/prisma" } datasource db { provider = "postgresql" }

And my prisma.config.ts file looks like this:

import "dotenv/config"; import { defineConfig, env } from "prisma/config"; export default defineConfig({ schema: "prisma/schema.prisma", migrations: { path: "prisma/migrations", }, datasource: { url: env("DATABASE_URL"), }, });

But after adding, in this code I have this error:

import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() export default prisma //error: // config = optionsArg.__internal?.configOverride?.(config) ?? config ^ // TypeError: Cannot read properties of undefined (reading '__internal')
Read Entire Article