R
Railway17mo ago
bhaskar

deployment fails Node JS and Typescript

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
32 Replies
Percy
Percy17mo ago
Project ID: 222e0fcf-5798-449d-93b1-caefdc077ef8
Percy
Percy17mo ago
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.
⚠️ experimental feature
bhaskar
bhaskar17mo ago
using typescript version - "typescript": "^4.4.2" i am not using tsc
Brody
Brody17mo ago
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
bhaskar
bhaskar17mo ago
it fails without nodemon as well
Brody
Brody17mo ago
Does it give any useful errors when it fails without nodemon?
bhaskar
bhaskar17mo ago
let me try again
Brody
Brody17mo ago
Also, are you on the trial plan?
bhaskar
bhaskar17mo ago
getting this
npm WARN config production Use `--omit=dev` instead.
> temporal-production@0.1.0 start
> ts-node src/main.ts
Killed
npm WARN config production Use `--omit=dev` instead.
> temporal-production@0.1.0 start
> ts-node src/main.ts
Killed
Brody
Brody17mo ago
?
bhaskar
bhaskar17mo ago
monthly subscription just upgraded
Brody
Brody17mo ago
Ah okay because I was about to say this kinda looked like an out of memory issue
bhaskar
bhaskar17mo ago
should i redeploy since i just upgraded?
Brody
Brody17mo ago
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?
bhaskar
bhaskar17mo ago
that works! not much. i suppose. i will be the one pretty much using it for now
Brody
Brody17mo ago
Well it must have been using more than 512mb Or approaching it to be killed
bhaskar
bhaskar17mo ago
yes looks like it
Brody
Brody17mo ago
Ah yes memory spikes
bhaskar
bhaskar17mo ago
oom
Brody
Brody17mo ago
Well all is good now oom indeed
bhaskar
bhaskar17mo ago
i think i can figure this out. thanks
Brody
Brody17mo ago
Is it still getting killed?
bhaskar
bhaskar17mo ago
not anymore
Brody
Brody17mo ago
Then you're good, as long as the memory usage eventually comes back down after a spike
bhaskar
bhaskar17mo ago
got it. I am new to this. is there a way i can scale up the instances?
Brody
Brody17mo ago
You think your app will need more resources than 8 vCPU and 8gb of ram?
bhaskar
bhaskar17mo ago
not for now
Brody
Brody17mo ago
You can always upgrade to the teams plan in the future Team plans have access to 32 vCPU and 32gb of ram
bhaskar
bhaskar17mo ago
got it can we run multiple instances?
Brody
Brody17mo ago
Yes but you will have to handle the load balancing yourself with cloudflare / caddy / nginx
bhaskar
bhaskar17mo ago
ok got it thanks
Brody
Brody17mo ago
Railway native horizontal scaling with load balancing is in progress though