I am getting an error when I defined the db

I have downloaded the necessary package using the bun but still it's throwing an error.
No description
10 Replies
Boby
BobyOP2mo ago
No description
oke
oke5w ago
Drizzle ORM - Neon
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
oke
oke5w ago
You're supposed to use
const sql = neon(process.env.DATABASE_URL!);
const db = drizzle({ client: sql });
const sql = neon(process.env.DATABASE_URL!);
const db = drizzle({ client: sql });
Boby
BobyOP5w ago
thanks for your help @oke but I am still getting this error
Boby
BobyOP5w ago
No description
oke
oke4w ago
That's a weird error. Maybe try restarting VSCode or restarting the Typescript server
Boby
BobyOP4w ago
I tried restarting the ts server but error still persisted
Ganbatte
Ganbatte4w ago
Maybe try this: import { neon } from '@neondatabase/serverless'; import { drizzle } from 'drizzle-orm/neon-http'; import * as schema from './schema'; const sql = neon(process.env.NEON_DATABASE_URL!); const db = drizzle(sql, { schema }); export default db; It is worked for me.
Boby
BobyOP4w ago
thanks @Ganbatte but I have already tried this and it was throwing an error
Boby
BobyOP4w ago
GitHub
[BUG]: not able to parse the schema in the drizzle function · Issue...
What version of drizzle-orm are you using? ^0.35.3 What version of drizzle-kit are you using? ^0.26.2 Describe the Bug I am getting an error that expected one argument but got two Expected behavior...
Want results from more Discord servers?
Add your server