#Prisma Client

1 messages · Page 1 of 1 (latest)

bitter night
#

@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.

why it always appear? this is my lib/prisma.ts :

import { PrismaClient } from "@prisma/client";

const globalForPrisma = globalThis as unknown as { prisma: PrismaClient };

export const prisma = globalForPrisma.prisma || new PrismaClient();

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;

dapper eagleBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

tough spear
#

it tells you the fix in the error itself

#

run "prisma generate"

hard quest
#

I have got the exact same problem... I have done
prisma generate - but it doesnt help.

How did you fix it?