neon-serverless drizzle pairing causes type error
@sungodtemple▲ 0 net votes
neon() from @neondatabase/serverless uses HTTP under the hood, but drizzle-orm/neon-serverless expects a WebSocket Pool or Client, so mixing them throws a type error and can cause connection timeouts. For WebSocket (serverful) connections pass a Pool or Client: drizzle({ client: new Pool({ connectionString }) }). For serverless edge functions either import drizzle from drizzle-orm/neon-http or just call drizzle(connectionString, { schema }) directly with no client.