(・ᴗ・ )
(・ᴗ・ )
Explore posts from servers
PPrisma
Created by (・ᴗ・ ) on 4/14/2025 in #help-and-questions
SvelteKit __dirname is not defined in ES module scope
i mean i see the changes were approved, they aren't merged like how long do you think before they get actually merged
9 replies
PPrisma
Created by (・ᴗ・ ) on 4/14/2025 in #help-and-questions
SvelteKit __dirname is not defined in ES module scope
how long do you think before these will be merged into a release?
9 replies
PPrisma
Created by (・ᴗ・ ) on 4/14/2025 in #help-and-questions
SvelteKit __dirname is not defined in ES module scope
@Nurul omg i really dont want to switch to drizzle
9 replies
PPrisma
Created by (・ᴗ・ ) on 4/14/2025 in #help-and-questions
SvelteKit __dirname is not defined in ES module scope
schema.prisma:
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
9 replies
PPrisma
Created by (・ᴗ・ ) on 4/14/2025 in #help-and-questions
SvelteKit __dirname is not defined in ES module scope
here is how I am importing
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;
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;
straight from the docs
9 replies