#deployment fails Node JS and Typescript

41 messages · Page 1 of 1 (latest)

sonic zodiac
#

I am new to railway. could you help me why deployment fails for me? I added custom start command npm run watch but it doesn't take it. please see the attach screen shots. Appreciate any help. thanks

Project id - 222e0fcf-5798-449d-93b1-caefdc077ef8

undone boughBOT
#

Project ID: 222e0fcf-5798-449d-93b1-caefdc077ef8

#

The issue is likely related to the wrong version of the TSC package being installed. It is recommended to remove "tsc": "^2.0.4" from the dependencies and use "typescript": "4.9.5" instead.

sonic zodiac
#

using typescript version - "typescript": "^4.4.2"

#

i am not using tsc

vivid vault
#

Does your app still crash without using nodemon? You shouldn't be using nodemon in production

#

Remove the custom start command from the service settings

sonic zodiac
#

it fails without nodemon as well

vivid vault
#

Does it give any useful errors when it fails without nodemon?

sonic zodiac
#

let me try again

vivid vault
#

Also, are you on the trial plan?

sonic zodiac
#

getting this ```npm WARN config production Use --omit=dev instead.

[email protected] start
ts-node src/main.ts
Killed

vivid vault
sonic zodiac
#

monthly subscription just upgraded

vivid vault
#

Ah okay because I was about to say this kinda looked like an out of memory issue

sonic zodiac
#

should i redeploy since i just upgraded?

vivid vault
#

Oh you JUST upgraded, then yes

#

Though I'm not sure how fast railways systems will switch you over to dev hardware

#

run this project locally, how much ram does it use?

sonic zodiac
#

that works!

#

not much. i suppose. i will be the one pretty much using it for now

vivid vault
#

Well it must have been using more than 512mb

#

Or approaching it to be killed

sonic zodiac
#

yes looks like it

vivid vault
#

Ah yes memory spikes

sonic zodiac
#

oom

vivid vault
#

Well all is good now

#

oom indeed

sonic zodiac
#

i think i can figure this out. thanks

vivid vault
#

Is it still getting killed?

sonic zodiac
#

not anymore

vivid vault
#

Then you're good, as long as the memory usage eventually comes back down after a spike

sonic zodiac
#

got it. I am new to this. is there a way i can scale up the instances?

vivid vault
#

You think your app will need more resources than 8 vCPU and 8gb of ram?

sonic zodiac
#

not for now

vivid vault
#

You can always upgrade to the teams plan in the future

#

Team plans have access to 32 vCPU and 32gb of ram

sonic zodiac
#

got it can we run multiple instances?

vivid vault
#

Yes but you will have to handle the load balancing yourself with cloudflare / caddy / nginx

sonic zodiac
#

ok

#

got it thanks