websockets fail on nodejs test package
Hey all, I have a monorepo which looks something like this
My db works fine running from the dev server for the 'web' app, but if I run from the test package I get the following
I'm in the middle of migrating the project from pscale/mysql so everything was working before. I've tried installing
wsas a dependency for the test package but still no luck.
My db package looks like this (using drizzle)
test/package.json
Since it's working on the web app, I'm not sure what else to do 🤷♂️2 Replies
robust-apricotOP•2y ago
The error sends me here:
https://github.com/neondatabase/serverless/blob/main/CONFIG.md#websocketconstructor-typeof-websocket--undefined
But I'm using the Pool constructor for the drizzle connection which doesnt accept a webSocket
GitHub
serverless/CONFIG.md at main · neondatabase/serverless
Connect to Neon PostgreSQL from serverless/worker/edge functions - neondatabase/serverless
robust-apricotOP•2y ago
Fixed it! 🥴
should of just followed the instructions:
The Singleton pattern for the neonConfig threw me through a loop