Closed luzhengyang closed 10 months ago
Hey, and thanks for your interest in the project! This is a strange error for me too. But let's try to figure it out.
Looks like the issue is related to the Node.js DNS resolution failing for the hostname Jg
, resulting in the ENOTFOUND
error. The hostname seems incorrect or not resolvable to an IP address, so the application is unable to connect to the PostgreSQL database.
Could you provide the database provider are you working with (Neon, Vercel Storage, or something else)? Additionally, which version of Node.js you're currently using?
Check your PostgreSQL connection string. Make sure it's correctly formatted and doesn't contain any typos or extraneous characters.
Could you please share the format of your connection string? Of course, please redact any sensitive information. In my case, my Neon PostgreSQL connection string looks like this:
postgres://username:password@something-random-here.eu-central-1.aws.neon.tech/your-database-name
It's unusual for a hostname to be 'Jg'
, so it's the strange error for me. Usually, it should be something like localhost
or an IP address, or like above (something-random-here.eu-central-1.aws.neon.tech
).
If you have PostgreSQL installed, you can try connecting to the PostgreSQL database manually by using the following command (if you tried this, please let me know what happens or what do you see):
psql postgres://username:password@something-random-here.eu-central-1.aws.neon.tech/your-database-name
By following these steps and answering the additional questions, we should be able to narrow down the source of the error.
Also please note, in the file src/data/db/client.ts
I specified this:
const connectionString = process.env.DATABASE_URL + "?sslmode=require";
So there's no need to append ?sslmode=require to your connection string manually.
Relivator v1.1.0 has been released! 🚀 It now features an even easier installation process, with options to switch technologies on-the-fly, such as PostgreSQL/MySQL and NextAuth.js/Clerk!
Hey,
I'd like try this framework, but I got stuck at the first step when trying to install it locally. I have a postgresql connection string set up in .env, but I got the following error when running
pnpm install
orpnpm db:push
. What is the hostname:'Jg'?