DT
Drizzle Teamโ€ข10mo ago
Arthur

Error with drizzle (sql)

Hey guys, I created a index.ts file to set up neon and drizzle import { neon, neonConfig } from '@Neondatabase/serverless'; import {drizzle} from "drizzle-orm/neon-http"; neonConfig.fetchConnectionCache = true if(!process.env.DATABASE_URL) { throw new Error ('database url not found'); } const sql = neon(process.env.DATABASE_URL); export const db = drizzle(sql); But i have an error on sql in drizzle(sql) and can't figure out the solution. "Argument of type 'NeonQueryFunction<false, false>' is not assignable to parameter of type 'NeonQueryFunction<boolean, boolean>'. Types of property 'transaction' are incompatible. Type '<ArrayModeOverride extends boolean = false, FullResultsOverride extends boolean = false>(queriesOrFn: NeonQueryPromise<false, false, any>[] | ((sql: NeonQueryFunctionInTransaction<ArrayModeOverride, FullResultsOverride>) => NeonQueryInTransaction[]), opts?: HTTPTransactionOptions<...> | undefined) => Promise<...>' is not assignable to type '<ArrayModeOverride extends boolean = boolean, FullResultsOverride extends boolean = boolean>(queriesOrFn: NeonQueryPromise<boolean, boolean, any>[] | ((sql: NeonQueryFunctionInTransaction<ArrayModeOverride, FullResultsOverride>) => NeonQueryInTransaction[]), opts?: HTTPTransactionOptions<...> | undefined) => Promise...'. " Thanks for the support ๐Ÿ™‚
2 Replies
Mast_Qalandar
Mast_Qalandarโ€ข10mo ago
you found any solution of this problem ??
Mykhailo
Mykhailoโ€ข10mo ago
Hello, @Mast_Qalandar, PR with fix is in development https://github.com/drizzle-team/drizzle-orm/pull/1946
Want results from more Discord servers?
Add your server