TS error in example code
The code suggested on the Prisma tab in these docs gives a TS error on the
const adapter = new PrismaNeon(pool);
line:
I'm on the latest version of Prisma (6.6.0).
(I'm struggling to get Prisma, Neon, Authjs, its middleware, and Nextjs to all work together, and this TS error is currently my only lead.)Neon
Neon serverless driver - Neon Docs
The Neon serverless driver is a low latency Postgres driver for JavaScript and TypeScript that allows you to query data from serverless and edge environments over HTTP or WebSockets in place of TCP. T...
4 Replies
like-gold•5mo ago
hi! did you find the solution?
robust-apricot•5mo ago
I also have this issue if there are any updates on this
Hey guys I found where this issue occurs.
https://github.com/prisma/prisma/commit/3f27f119919cd77eda82ebb2e0d06f8d26f7ff1f
The code was recently changed where the
.connect
function automatically creates the pool for you using the config.
When the docs was created you were originally interacting with PrismaNeonAdapter
seems like it was changed so you interact with this new factory class which makes the pool for you.
These are the correct docs https://github.com/prisma/prisma/blob/main/packages/adapter-neon/README.md
The neon docs needs to be updated the resemble the new code changes.robust-apricot•5mo ago
This is the PR I opened to update the docs
https://github.com/neondatabase/website/pull/3389
GitHub
docs: Updates Prisma docs to align with recent changes by harrisonh...
In reference to prisma/prisma#26633
Pool is now handled by the PrismaNeon class (PrismaNeonAdapterFactory)
export class PrismaNeonAdapterFactory implements SqlDriverAdapterFactory {
readonly prov...
absent-sapphire•5mo ago
Thank you so much for the PR @Duck! I approved it and will get it merged