Neon DB serverless driver local development
Hey, did anyone manage to get Neon DB serverless driver working locally? It seems that some libraries aren't included with Nuxt for local development (edge libraries) and I keep running into errors.
2 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Did you use their serverless driver? https://neon.tech/docs/serverless/serverless-driver
I get this error:
[nuxt] [request error] [unhandled] [500] m.getRandomValues is not a function 8:25:15 PM
at Object.io (./node_modules/@neondatabase/serverless/index.js:1:44038)
at Object.cu [as startSession] (./node_modules/@neondatabase/serverless/index.js:1:58678)
at ./node_modules/@neondatabase/serverless/index.js:43:25923
at Ht._checkPgPass (./node_modules/@neondatabase/serverless/index.js:43:25508)
at Ht._handleAuthSASL (./node_modules/@neondatabase/serverless/index.js:43:25881)
at F.emit (./node_modules/@neondatabase/serverless/index.js:1:30985)
at ./node_modules/@neondatabase/serverless/index.js:43:20214
at hn.parse (./node_modules/@neondatabase/serverless/index.js:43:12987)
at V.<anonymous> (./node_modules/@neondatabase/serverless/index.js:43:18325)
at F.emit (./node_modules/@neondatabase/serverless/index.js:1:30985)
Also I have to import ws from 'ws' to get it at least try to connect, otherwise I'm getting:
[nuxt] [request error] [unhandled] [500] All attempts to open a WebSocket to connect to the database failed. Please refer to https://github.com/neondatabase/serverless#run-on-node
at ws (./node_modules/@neondatabase/serverless/index.js:43:2727) 7:01:04 PM
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)