I want to connect to postgres using vercel
Unanswered
Lilac posted this in #help-forum
LilacOP
I'm learning Next.js
PS D:\Work\Next\Next-Acme> npm run seed
node:events:492
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 55.28.36.18:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
Emitted 'error' event on WebSocket instance at:
at emitErrorAndClose (D:\Work\Next\Next-Acme\node_modules\ws\lib\websocket.js:1016:13)
at ClientRequest.<anonymous> (D:\Work\Next\Next-Acme\node_modules\ws\lib\websocket.js:864:5)
at ClientRequest.emit (node:events:514:28)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4039,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '55.28.36.18',
port: 443
}
Node.js v18.17.0
please help me to fix this error
PS D:\Work\Next\Next-Acme> npm run seed
seed
node -r dotenv/config ./scripts/seed.js
node:events:492
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 55.28.36.18:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
Emitted 'error' event on WebSocket instance at:
at emitErrorAndClose (D:\Work\Next\Next-Acme\node_modules\ws\lib\websocket.js:1016:13)
at ClientRequest.<anonymous> (D:\Work\Next\Next-Acme\node_modules\ws\lib\websocket.js:864:5)
at ClientRequest.emit (node:events:514:28)
at TLSSocket.socketErrorListener (node:_http_client:501:9)
at TLSSocket.emit (node:events:514:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4039,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '55.28.36.18',
port: 443
}
Node.js v18.17.0
please help me to fix this error
34 Replies
LilacOP
@RayThanks for your attention
yes of course
yes of course
@Lilac <@743561772069421169>Thanks for your attention
yes of course
how does your
POSTGRES_URL look like? is it look like this postgres://xxxxx:xxxxx@xxxxx.xxxx.xxx.xxx.vercel-storage.com:5432/xxxxbecause from the error above, look like you were connecting to port 443
Original message was deleted
please delete or regenerate your secret 👀
LilacOP
you mean delete postgres url?
the message here
Original message was deleted
this message
LilacOP
you mean you can build it?
@Lilac you mean you can build it?
yes i can run the script with your url
@Lilac you mean you can build it?
what is your node version?
LilacOP
18.17.0
@Ray
I created postgres in vercel.com
my project connected in vercel
perhaps...
@Lilac my project connected in vercel
you cloned the nextjs-dashboard right?
LilacOP
yes
@Lilac yes
im not sure why you can't connect to it. Maybe try delete the database and create a new one or contact vercel
https://vercel.com/help
https://vercel.com/help
LilacOP
ok
thanks
LilacOP
@RayHello, bro
how can you use .env?
https://nextjs.org/learn/dashboard-app/setting-up-your-database
This is my learning site
you think, what do I do?
This is my learning site
you think, what do I do?
@Lilac how can you use .env?
you should see
.env.samplecopy it and rename it to
.envOriginal message was deleted
have you run npm install?
Original message was deleted
delete this image
@Ray have you run npm install?
LilacOP
yes
@Lilac yes
yeah not sure why you are unable to connect to the database, maybe try updating the node version to v20.10