`TypeError: Cannot read properties of undefined (reading 'query')`

import "dotenv/config";
import * as schema from "./schema.js";
import { drizzle } from "drizzle-orm/node-postgres";

const db = drizzle(process.env.DATABASE_URL!, {
schema,
});

export { db };
import "dotenv/config";
import * as schema from "./schema.js";
import { drizzle } from "drizzle-orm/node-postgres";

const db = drizzle(process.env.DATABASE_URL!, {
schema,
});

export { db };
```
2 Replies
acronie
acronieOP4w ago
Getting this weird error
await db.insert(product).values({
description: body.description,
images: body.images,
name: body.name,
price: body.price,
thumbnail: body.thumbnail,
});
await db.insert(product).values({
description: body.description,
images: body.images,
name: body.name,
price: body.price,
thumbnail: body.thumbnail,
});
Unknown User
Unknown User6d ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server