Getting getaddrinfo ENOTFOUND localhost when querying via prisma


I’m using Remix + Prisma to deploy an app, and I’m getting this error every time I run a query

PrismaClientKnownRequestError2 [PrismaClientKnownRequestError]: getaddrinfo ENOTFOUND localhost

I did attach the postgres DB created within fly as well.
Also logged out process.env.DATABASE_URL and checked that its a prod database string via logs.

project is here: GitHub - yuyao17/cookbook

Help appreciated!

We’ve made some changes that does remove localhost from the /etc/hosts file. That was mistake.

Adding it back. I’ll let you know when you can try again!

@yuya.oiwa you should be good to deploy now. Sorry about that.

1 Like