TypeError: Cannot read properties of undefined (reading '__internal')
I upgraded to Prisma 7, and when I try to start my project, it starts giving an error in @prisma/client and I don't know why, everything is configured correctly.



36 Replies
You've gone full bot mode! Let me fetch that AI answer for you ASAP.
The error TypeError: Cannot read properties of undefined (reading 'internal') after upgrading to Prisma 7 is a known issue, especially in monorepo setups or when using custom configurations. Based on the knowledge sources, here are the most likely causes and solutions:
1. Prisma 7 Requires an Adapter: With Prisma 7, the default client is now "Rust-free" and requires you to initialize your PrismaClient with an adapter (or accelerateUrl). If you see an error mentioning "engine type 'client' requires either 'adapter' or 'accelerateUrl'", you need to update your PrismaClient initialization. See the Prisma 7 breaking changes for more details.
2. Out-of-Sync Client and Runtime: If you manually install or update packages like @prisma/client-runtime-utils, you may end up with mismatched versions between the generated client and the runtime, leading to the internal error. Always ensure you run npx prisma generate after upgrading and that all Prisma-related packages are on the same version. This issue is especially common in pnpm monorepos due to symlink and hoisting behavior. Reverting to Prisma 6 resolved the issue for some users, but ideally, ensure all dependencies are aligned and generated code is up-to-date source.
3. Seeding and Custom Config: Some users encountered this error when running seed scripts after upgrading. Placing prisma.config.ts at the project root and ensuring it is correctly configured resolved the issue for them source.
Summary of steps to try:
- Ensure you have a prisma.config.ts at your project root if required.
- Update your PrismaClient initialization to include an adapter if using the Rust-free client.
- Run npx prisma generate after any upgrade.
- Make sure all Prisma packages are on the same version.
- If using a monorepo, check for issues with symlinks and hoisting.
If
these steps do not resolve your issue, the knowledge sources do not provide a more specific solution.
š¤ Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.
use the new prisma-client instead of js
also create singleton for prisma client
I'm getting this error now, I'm using it the way you said.



it says you need to generate
prisma generate
It has already been generated in ./generated/prisma
when you change the client you need to generate new one
Yes, I know, and I generated it; it's there in the terminal.

try this
It gave the same error, I don't know why.


maybe cache try to delete the whole genereated folder restart your ide and generate once more
Ok
I'm still having the same problem, in @prisma/client, I don't know why, I did everything you said.

hmm
downgrade to prisma 6.19
prisma 7 seems not ready now

literaly i've made one with those configs and it worked
like 20 mins ago
so it could be everything
ok, It worked for me, thank you!
we need to wait for prisma 7.1 something with the 7.0 configs is just not working right
Okay, I had updated it because the Prisma extension kept telling me to update, etc...
same
literaly spent like 2 hours figuring this out today XD
lol
I'll keep an eye on it now when it updates to see if it's a stable version so I don't suffer again.
@Kiryo @sync pass an empty object into PrismaClient to fix the error!
this one
Like this?
like what?
How do I do that?
{} is the empty object which you need to pass into the PrismaClient constructoroh okay
Sorry, I don't know English very well and sometimes the translator doesn't help.
oh okay
That's what happened, but which adapter can I use for PostgreSQL?


hi
i had same issue along side other in turborepo setup
i fixed this setup,
and in the package.json file you should add this "type": "module", before the script


and also you should download this "@prisma/client-runtime-utils": "^7.0.0",
the postgresql adapter sir
it's in the docs
You are outputting the prisma client in
../generated/prisma
So you need to import from the generated folder not @prisma/client
import { PrismaClient } from "../generated/prisma/client"
Docs - https://www.prisma.io/docs/getting-started/prisma-orm/quickstart/postgresqlQuickstart: Prisma ORM with PostgreSQL (10 min) | Prisma Documentation
Create a new TypeScript project from scratch by connecting Prisma ORM to PostgreSQL and generating a Prisma Client for database access.