diff --git a/content/300-guides/500-other/880-troubleshooting-orm/100-help-articles/400-nextjs-prisma-client-dev-practices.mdx b/content/300-guides/500-other/880-troubleshooting-orm/100-help-articles/400-nextjs-prisma-client-dev-practices.mdx index 1f055a4a92..7e7906bd2f 100644 --- a/content/300-guides/500-other/880-troubleshooting-orm/100-help-articles/400-nextjs-prisma-client-dev-practices.mdx +++ b/content/300-guides/500-other/880-troubleshooting-orm/100-help-articles/400-nextjs-prisma-client-dev-practices.mdx @@ -20,7 +20,7 @@ In development, the command `next dev` clears Node.js cache on run. This in turn The solution in this case is to instantiate a single instance `PrismaClient` and save it on the [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) object. Then we keep a check to only instantiate `PrismaClient` if it's not on the `globalThis` object otherwise use the same instance again if already present to prevent instantiating extra `PrismaClient` instances. -```ts file=./db +```ts file=db.ts import { PrismaClient } from '@prisma/client' const prismaClientSingleton = () => {