cant connect to VSC
hey everyone,so my problem is i cant connect the supabase to node.JS
tried with chatgpt but it just puts me in circles
basically: im trying a few different ways
DATABASE_URL=postgresql://postgres:[myactual password]@aws-0-eu-west-1.pooler.supabase.com:6543/postgres
postgresPORT=4000
JWT_SECRET=mykey
or im trying with 5432 instead of 6543 bcz sometimes it says i cant connect through IPv4
chatgpt tells me im using wrong password but i changed and tried with 50 different passwords.cant even find it on youtube.been trying for like 5 hours.would be very thankful.
also not sure if it has anything to do with it im using postgreSQL i belive.
8 Replies
the error: Auth error: error: Tenant or user not found
at C:\Users\OneDrive\Documents\GitHub\node_modules\pg-pool\index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async file:///C:/Users/OneDrive/Documents/GitHub/server/src/routes/auth.js:29:22 {
length: 52,
severity: 'FATAL',
code: 'XX000',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: undefined,
line: undefined,
routine: undefined
If you are using the IPv4 pooler (the aws ... .com one) session port 5432 or the transaction port 6543 then your user name is postgres.INSTANCE_ID followed by :password.
Just go to your connection tab at top of the dashboard. Then select the appropriate pooler type it will show you the format.

already did.its this:postgresql://postgres:[YOUR_PASSWORD]@db.vonwlvujclzsuiwjnfvh.supabase.co:5432/postgres
but thisone inst compatable to IPV4
so i found the one that is but it doesnt work either
The one you just showed is IPv6 (.co) it won't work on IPv4.
Look at the username in the one I linked. postgres.instanceID:password.
I underlined username for that link.
But the connection tab shows you exactly what to use.
yep i tried it as well earlier but it didnt work.
DATABASE_URL=postgresql://postgres:YOURPASSWORD@aws-1-eu-west-1.pooler.supabase.com:5432/postgres
PORT=4000
JWT_SECRET=supersecretkey
this code is correct for the .env right?
of course with the actual database password and JWT key
It is not just postgres:YOURPASSWORD. It is postgres.instanceID:YOURPASSWORD
See the connect tab for pooler connections.
See my underlined part above.
Find the screen I showed in the connection tab.
got it.thank you very much my friend.