P
Prismaā€¢3mo ago
Doma

Can't use Neon

After pasting the schema.prism and .env sections I tried to run this command npx prisma migrate dev --name init However, I get this error: Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": PostgreSQL database "REST%20API%20Dave", schema "public" at "ep-purple-smoke-a2unvbp5-pooler.eu-central-1.aws.neon.tech" Error: P1001: Can't reach database server at ep-purple-smoke-a2unvbp5-pooler.eu-central-1.aws.neon.tech:5432 Please make sure your database server is running at ep-purple-smoke-a2unvbp5-pooler.eu-central-1.aws.neon.tech:5432. I even tried to modify timeout and all that like what the docs say: &connect_timeout=10&connection_limit=20&pool_timeout=15 What should I do?
4 Replies
Doma
Domaā€¢3mo ago
Dave Gray
YouTube
Nest.js REST API with Prisma ORM, Neon Postgres
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap Learn how to build a Nest.js REST API with Prisma ORM and Neon Postgres. You will set up a serverless postgres database with Neon, integrate Prisma ORM into your Nest.js application, and test the completed REST API. šŸ’– Support me on Patreon āžœ https://patreon.com/davegra...
Nurul
Nurulā€¢3mo ago
Hey šŸ‘‹ Can you use the non pooled connection string to run migrate command and check? I believe, you get two connection strings from Neon, one is with connection pooling and the other is without connection pooling. Could you use the one without the connection pooling?
Doma
Domaā€¢2mo ago
I tried that before, tried it again, still nothing I'm afraid
Nurul
Nurulā€¢2mo ago
That's strange. Can you add DEBUG="*" in your env variables and check if you get some more error logs? https://www.prisma.io/docs/orm/prisma-client/debugging-and-troubleshooting/debugging
Debugging (Reference) | Prisma Documentation
This page explains how to enable debugging output for Prisma Client by setting the DEBUG environment variable.