Repository navigation
fix: remove neonConfig WebSocket override for Bun+Docker compatibility - #881
Merged
Merged
Conversation
- Remove webSocketConstructor = ws override that caused 'Unexpected server response: 101' in Bun runtime when deployed to Docker - Align with official Neon docs: use HTTP driver for Drizzle (no config) - Use PrismaNeon adapter without neonConfig for Node/Bun - Keep poolQueryViaFetch for Prisma Workers (edge runtime) - Remove ws and @types/ws from Neon dependencies Fixes #879 Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
WalkthroughThis PR removes websocket ("ws") dependency wiring and neonConfig customization from Neon-related PostgreSQL setups across Prisma and Drizzle integrations. The changes eliminate websocket constructor assignments and edge-fetch pooling configurations while maintaining the core Neon serverless adapter functionality. Changes
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #879 - Bun runtime + Prisma Neon adapter: WebSocket constructor override causes production failure in Docker.
Problem
Using
neonConfig.webSocketConstructor = ws(Node's ws library) in a Bun environment causedUnexpected server response: 101in Docker. Forcing Node's ws implementation inside Bun runtime caused protocol upgrade mismatches in containerized environments.Solution
neon-http) withneon()+drizzle()only - uses fetch by default, no WebSocket required.poolQueryViaFetch = truefor edge runtime.wsand@types/wsfrom Neon setup (both Prisma and Drizzle).Aligns with official Neon Drizzle docs and Neon Prisma docs.
Made with Cursor
Summary by CodeRabbit