#GetAddrInfoReqWrap.onlookup FAILING my deployment

67 messages · Page 1 of 1 (latest)

glass zephyr
#

GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) {

#12 7.515 errno: -3008,

#12 7.515 code: 'ENOTFOUND',

#12 7.515 syscall: 'getaddrinfo',

#12 7.515 hostname: 'postgres.railway.internal'

#12 7.515 }

hey everyone i get this error and i have no idea why this is happening it worked perfectly before adding migrations being build beforehand

green blazeBOT
#

Project ID: 05fccf62-810b-455f-83a0-a63bcb5042c0

glass zephyr
#

05fccf62-810b-455f-83a0-a63bcb5042c0

#
      "build": "tsc && yarn sync && yarn migrate:run",
      "sync": "cd build && npx typeorm migration:generate ./migration/Init -o -d ./data-source.js",
      "migrate:run": "cd build && npx typeorm migration:run -d ./data-source.js",
dim helm
#

could you try adding a 3 second sleep in in your start command?

glass zephyr
#

im not using the start at all sir

#

its when the docker is being build

dim helm
#

oh yea, private neworking is not available during build, you'd need to place migrations in your start command

glass zephyr
#

oh shizzle

#

lemme test it sir one sec

#
 "start": "ts-node src/index.ts && yarn sync && yarn migrate:run",
#

like this?

dim helm
#

perhaps, see if it works
( although I wouldn't recommend running typescript in production )

glass zephyr
#

it shouldnt run typescript it should build then use the build right

#

wait omg no its ts-node

#

hahaahaha

#

its first time doing this bare with me

#

"start": "node ./build/index.ts && yarn sync && yarn migrate:run",

dim helm
#

all good 🙂

glass zephyr
#

allrighttyyy lemme test

#

now my orm is giving me errors

#

😔

#

i can copy paste text if this is not readable

dim helm
#

could you try

"start": "sleep 3 && node ./build/index.ts && yarn sync && yarn migrate:run",
wary jay
#

are you using alpine?

glass zephyr
#

idk this i didnt do anything but connect my app

glass zephyr
wary jay
#

easiest way of trying is to add ENABLE_ALPINE_PRIVATE_NETWORKING=true to the env variables

glass zephyr
#

what does this do?

dim helm
#

It removes the fallback DNS server

dim helm
#

if you don't have a dockerfile and you're simply building a node app then you're likely not using an alpine based image

glass zephyr
#

yea i just conencted and it used nix or something and did its thing

#

WAIT

#

THE SLEEP WORKED

#

LOL

dim helm
#

yea I think you're cool then

dim helm
glass zephyr
#

can i ask why sleep

#

😂

#

i would never have guessed that was the issue

dim helm
#

Private Networking takes a bit to initialize, so we delay your start command a little to give it some time to initialize

wary jay
glass zephyr
#

when it builds does it make a folder called /build? because my entites cant be found by my orm now 😭

dim helm
glass zephyr
#
{
  "compilerOptions": {
    /* Basic Options */
    "incremental": true,
    "target": "es6",
    "module": "commonjs",
    "outDir": "build",
#

it should create a build dir right

dim helm
#

looks like it

glass zephyr
#

okayokay ez fix

#

man thank you so much!! im moving my client to this

#

no more droplets 😭

dim helm
#

oh

#

try this

#
"start": "sleep 3 && node build/index.js && yarn sync && yarn migrate:run",
glass zephyr
#

i already fixed the .js

dim helm
#

we set it to build/index.ts before, instead of build/index.js

#

oh

glass zephyr
#

IT WORKS 😭

#

THANK!!!

dim helm
#

chad_moment no problem

glass zephyr
#

im buying u coffee as we speak

#

@dim helm dont have moeny on my card i wrote it down on my reminder

#

when i get paid

dim helm
#

Thank you so much ❤️ 😭

glass zephyr
#

❤️