Skip to content

Conversation

rnwolfe
Copy link

@rnwolfe rnwolfe commented Oct 10, 2025

Description

This PR fixes a runtime error caused by passing a Pool instance into the PrismaNeon adapter instead of a PoolConfig object. The adapter expects a configuration object (with a connectionString), but the code constructed and passed a Pool, which lacks the expected connectionString property. Prisma's client then fell back to default host/user values and produced the runtime error:

“No database host or connection string was set, and key parameters have default values (host: localhost, user: ryan, db: ryan, password: null)...”

The change updates the PrismaNeon initialization to pass the expected PoolConfig object with the connectionString taken from DATABASE_URL.

Related Issues

Closes #643

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation, if necessary.
  • I have added tests that prove my fix is effective or my feature works. I verified manually.
  • New and existing tests pass locally with my changes.

Notes:

  • This fix is small and targeted; it should not affect other database behavior because it only changes how the Neon adapter is constructed.
  • I validated that pnpm migrate works and confirmed the root cause and fix in issue comments.

Screenshots (if applicable)

N/A

Additional Notes

Root cause and reproduction details are available in the original issue: #643

Copy link

vercel bot commented Oct 10, 2025

@rnwolfe is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@rnwolfe rnwolfe changed the title fix: Refactor PrismaNeon initialization to use PoolConfig instead of Pool directly**I fix: Refactor PrismaNeon initialization to use PoolConfig instead of Pool directly Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prisma + Neon adapter causes “No database host or connection string was set” runtime error

1 participant