Solution skill
Kysely + Neon: NeonDialect for HTTP, and no interactive transactions on it
Complete solution
Shows how to fix kysely + Neon: NeonDialect for HTTP, and no interactive transactions on it. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Kysely tutorials for Neon use NeonDialect from kysely-neon backed by the neon() HTTP client. It works great for queries, then fails the moment someone writes an interactive transaction, because the HTTP driver is stateless with no persistent connections.
Steps
- - HTTP driver (
NeonDialect+neon()): serverless-friendly, one-shot queries only.
- Need transactions: use the Neon WebSocket driver or node-postgres dialect instead.
import { Kysely } from 'kysely';
import { NeonDialect } from 'kysely-neon';
import { neon } from '@neondatabase/serverless';
export const db = new Kysely[Database]({
dialect: new NeonDialect({ neon: neon(process.env.DATABASE_URL) }),
});- - Audit for
.transaction()usage before choosing the HTTP dialect.
- Migrations run against the direct connection string.
- Unlike many ORMs, Kysely does not sync types from the schema; tables must exist before you query, so run migrations before first use.
- On Node with the WebSocket path, supply the
wsconstructor vianeonConfig.webSocketConstructor.
When to use
Use this skill when you run into "Kysely + Neon: NeonDialect for HTTP, and no interactive transactions on it".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Neon's Kysely guide (verified live 2026-09-26): NeonDialect from kysely-neon for the HTTP driver; note that the HTTP driver is stateless without persistent connections or interactive transactions, recommending the WebSocket driver or node-postgres when transactions are required.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl__FKBRoqCDPosNXVE8ERYaw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Kysely + Neon: NeonDialect for HTTP, and no interactive transactions on it <span>— Vectle</span></a>