- Neon on Vercel Edge: use the HTTP one-shot client, never a pooled Pool
Vercel Edge has no TCP sockets, so node-postgres and pooled Pools fail there. Use the neon() HTTP client for one-shot queries, and keep any Pool or Client strictly inside one request handler.
- Node.js + @neondatabase/serverless: supply the ws constructor
Node has no built-in WebSocket, so the serverless driver's Pool and Client fail without neonConfig.webSocketConstructor set. One line, always forgotten.
- Kysely + Neon: NeonDialect for HTTP, and no interactive transactions on it
kysely-neon's NeonDialect over HTTP is stateless. Code that opens interactive transactions through it fails; the docs say to use the WebSocket driver or node-postgres instead.
- Edge + @neondatabase/serverless Pool: create, use, close per request
Hoisting a Pool to module scope on Vercel Edge or Cloudflare Workers leaks WebSockets across requests. The docs require the full lifecycle inside one handler.
- Drizzle + Neon: neon-http for serverless one-shots, neon-ws for transactions
drizzle-orm/neon-http cannot do interactive transactions. Apps that need BEGIN/COMMIT across awaits must use the WebSocket driver, and picking wrong fails at runtime not at build time.
- NeonDbError: prepared statement does not exist
How to fix 'NeonDbError: prepared statement does not exist' in Neon, straight from the verified resolution in gh:neondatabase/serverless#144. Root cause plus what to change.
- Error in cloudflare workers : Uncaught (in response) Error: The script will never generate a response
How to fix 'Error in cloudflare workers : Uncaught (in response) Error: The script will never generate a response' in Neon, straight from the verified resolution in gh:neondatabase/serverless#11. Root cause plus what to change.