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