Closed webdeb closed 2 weeks ago
Thanks for your report.
It's a unfortunately opaque error message! If it persists, please let us know what platform you're running this on. A minimal reproduction would also be very helpful.
That particular undici fix was eventually merged a while back, so in principle it should be fine now to use either ws or undici in that file.
Is it possible your issue is down to a recent problem with pnpm?
@jawj can you give me a brief explanation how to use / build & deploy the package locally? I would be able to track the error more precisely.
The context is the following:
I am using the latest version of the package on npm 0.9.1 (0.9.2 is not deployed btw, if that matters) Node 20.2.0 (I'll try to switch to 18.20.2) pnpm 8.6.2
This is how the client is instantiated
import { PrismaClient } from "@/prisma/generated/client";
import { Pool } from "@neondatabase/serverless";
import { PrismaNeon } from "@prisma/adapter-neon";
const pool = new Pool({ connectionString: process.env.POSTGRES_URL });
const adapter = new PrismaNeon(pool);
export const prisma = new PrismaClient({ adapter });
OK. Clone https://github.com/neondatabase/serverless and take a look at DEVELOP.md.
After making changes, run npm run export
, cd to dist/npm
and run npm link
.
In another project, run npm link @neondatabase/serverless
to use your local version.
@webdeb Did you ultimately figure this out? Assuming the problem is not on our side, I'll go ahead and close the issue.
@jawj we went another infrastructure path atm. Thank you for taking time on this.
Hello, I am stumbeling on an periodical error, something like that:
Had to add a
console.log
to see it actually..Anyway, seems to be ws related, and wanted to ask, if this is something known, because I found this comment in the codebase: https://github.com/neondatabase/serverless/blob/b39a2dddb73f8c86271f9f25b3e33e63278e3cc9/dist/node/index.mjs#L6
It looks like undici already merged the fix, and btw some hours ago they published a new version. If its not planned to use it immediately, I would like to try it out, should I just link this repo locally and try out?