How do you guys setup drizzle with next 15?

Apparently it doesnt work anymore, when i put
import { drizzle } from "drizzle-orm/postgres-js";
import * as schema from "./schema";

export const db = drizzle(process.env.DATABASE_URL!, {
schema: schema,
});
import { drizzle } from "drizzle-orm/postgres-js";
import * as schema from "./schema";

export const db = drizzle(process.env.DATABASE_URL!, {
schema: schema,
});
error "net" not found when i put use server on top, it says error must be async function. What the hell do i do next?
1 Reply
Maston
Maston5d ago
where are you getting the error? are you importing db in a "use client" file by accident? this happens because it doesnt find "node:net" module, youre either importing it in the frontend somewhere or trying to use edge runtime which doesnt support it

Did you find this page helpful?