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.
10 Replies

Here is the relevant doc https://orm.drizzle.team/docs/connect-neon
Drizzle ORM - Neon
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
You're supposed to use
thanks for your help @oke but I am still getting this error

That's a weird error. Maybe try restarting VSCode or restarting the Typescript server
I tried restarting the ts server but error still persisted
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.thanks @Ganbatte but I have already tried this and it was throwing an error
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...