This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Prisma Postgres stopped working out of sudden, saying database string is invalid #22992
Labels
kind/bug
A reported bug.
Bug description
I was debugging my Next.js project with Prisma as my ORM. Everything was working fine. I logged into the dashboard page which lists all products from the Vercel Postgres database by using Prisma client.
Out of sudden, Prisma stopped working and no data can be fetched, basically any operations via Prisma error out. Here is an error example:
I have not changed anything in the .env or .env.local files, I did not even open those 2 files. So I opened the Vercel website, and copied the database connection strings again and put it into these 2 environment config files,
(I replaced the real password with in this post, but the real env files have the correct password which I copied from Vercel without any change).
Also copied the code for use in Prisma's schema file like below:
Also I just notice that I can pull my db schema from the Vercel PostgreSql database, this means the database connection string actually works. The issue could come from Prisma.
Also, I am able to launch the Prisma Studio and see all the data. So this is for sure the issue from
PrismaClient
.How to reproduce
.env
file and pasted in the code snippetschema.prisma
npx prisma db pull
andnpx prisma generate
,Expected behavior
I expect it to work as previously.
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: