N
Neon10mo ago
exotic-emerald

Cannot Connect Neon DB to Railway: Database connection error: Error: connect ECONNREFUSED ::1:5432

Hello! I'm building an app using neon for my database and railway to deploy but when deploying I get this error.
Database connection error: Error: connect ECONNREFUSED ::1:5432

at /app/node_modules/pg-pool/index.js:45:11

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

/app/node_modules/pg-pool/index.js:45

Error.captureStackTrace(err)

^



Error: connect ECONNREFUSED ::1:5432

at /app/node_modules/pg-pool/index.js:45:11

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async getPgVersion (/app/app.js:24:20) {

errno: -111,

code: 'ECONNREFUSED',

syscall: 'connect',

address: '::1',

port: 5432

}



Node.js v18.20.2
Database connection error: Error: connect ECONNREFUSED ::1:5432

at /app/node_modules/pg-pool/index.js:45:11

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

/app/node_modules/pg-pool/index.js:45

Error.captureStackTrace(err)

^



Error: connect ECONNREFUSED ::1:5432

at /app/node_modules/pg-pool/index.js:45:11

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async getPgVersion (/app/app.js:24:20) {

errno: -111,

code: 'ECONNREFUSED',

syscall: 'connect',

address: '::1',

port: 5432

}



Node.js v18.20.2
the database works well on local host. Here's my repo https://github.com/Orion-Barjamaj/Members-Only
GitHub
GitHub - Orion-Barjamaj/Members-Only
Contribute to Orion-Barjamaj/Members-Only development by creating an account on GitHub.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?