Installing Railway CLI

Hello I wrote "npm i -g @railway/cli " to terminal to download Railway CLI however, I saw the error in the screenshot, Can you help me, thanks
No description
50 Replies
Percy
Percy10mo ago
Project ID: N/A
Fragly
Fragly10mo ago
You need to install npm N/A
aydin26532
aydin26532OP10mo ago
118c0d3a-2e06-4eee-b22c-ab02d2947048
aydin26532
aydin26532OP10mo ago
No description
aydin26532
aydin26532OP10mo ago
I wrote the command you sent me in docs but I saw this error
Fragly
Fragly10mo ago
You'd need to install nodejs https://nodejs.org/en/download/
aydin26532
aydin26532OP10mo ago
I am using django but should I install nodejs I want to install railway clı
Fragly
Fragly10mo ago
might as well <:moyai_shrug:1106001173279940758>
aydin26532
aydin26532OP10mo ago
No description
aydin26532
aydin26532OP10mo ago
I installed node.js
aydin26532
aydin26532OP10mo ago
No description
aydin26532
aydin26532OP10mo ago
still have the problem
Fragly
Fragly10mo ago
could you uninstall that NodeJS and install from the link I sent? the one from the link I sent includes npm
aydin26532
aydin26532OP10mo ago
No description
Medim
Medim10mo ago
reopen that terminall It won't take effect until u open a new terminal
aydin26532
aydin26532OP10mo ago
ok it worked thanks, I installed railway cli with the comand npm i -g @railway/cli but for now, I don't know how to continue process. When I use github, will it directly change the docs in github, or will it directly effect railway database I am really new, in railway, don't know how to follow the proceure to update my project
Medim
Medim10mo ago
It will update at every commit If the service is linked to a github repo the cli isn't really necessary, u can do everything through the website
aydin26532
aydin26532OP10mo ago
it is necessary for migrations as I understand in django becasue I create my postgre database but it is said that there is no command line for migrations of django in railway directly I need to use ralway clı
Medim
Medim10mo ago
No you don't Migrations can be run on the start command You can't run a command from the railway cli to your service You can use your railway env vars, which is the same as using your prod env on your local machine
aydin26532
aydin26532OP10mo ago
what do you mean by sayng start command, yesterday one person said this but I stll on'unerstan
Medim
Medim10mo ago
No description
aydin26532
aydin26532OP10mo ago
thank you Brody btw 🙂 yesterday you helped me alot
Medim
Medim10mo ago
Your start command will be your migration command + the start
aydin26532
aydin26532OP10mo ago
but I crashed in this issue
Medim
Medim10mo ago
Like: npx sequelize db:migrate && npm run start this is for nodejs/sequelize @Brody u better correct me if i'm wrong kek
aydin26532
aydin26532OP10mo ago
most probably I know, but cannot match with the concept in django I start with python manage.py make mgiration then python manage.py migrate
Medim
Medim10mo ago
ok, what is the command u use to migrate? python manage.py migrate?
aydin26532
aydin26532OP10mo ago
yes two commands python maange.py makemigrations python manage.py migrate
Medim
Medim10mo ago
and whats your start command?
aydin26532
aydin26532OP10mo ago
python manage.py runserver
Medim
Medim10mo ago
python manage.py makemigrations && python manage.py migrate && python manage.py runserver so that would be your start command check the order, see if its correct
aydin26532
aydin26532OP10mo ago
you are askng the command that use to run my project, right
Medim
Medim10mo ago
yeah
aydin26532
aydin26532OP10mo ago
yes Brody veto 🙂
Brody
Brody10mo ago
python manage.py runserver starts a development server, you would need to replace this portion of your start command with the applicable gunicorn command
aydin26532
aydin26532OP10mo ago
web: gunicorn yv_optimizer.wsgi --log-file - can t be, in the Procfile
Brody
Brody10mo ago
yes it can web: python manage.py migrate && gunicorn yv_optimizer.wsgi --log-file -
aydin26532
aydin26532OP10mo ago
ok, where should I write this expression in order to mgirate my database
Brody
Brody10mo ago
in the Procfile
Medim
Medim10mo ago
what about the other migration command
Brody
Brody10mo ago
that command is ran locally
aydin26532
aydin26532OP10mo ago
ok, then I need to update my Procfile
Medim
Medim10mo ago
welp, guess that's on me for my nonexistent python knowledge
aydin26532
aydin26532OP10mo ago
No description
aydin26532
aydin26532OP10mo ago
updated
Brody
Brody10mo ago
looks good to me
aydin26532
aydin26532OP10mo ago
No description
aydin26532
aydin26532OP10mo ago
should I do any extra thing other than ading python manage.py makemigrations to Procfile to add my databse
Brody
Brody10mo ago
where there any errors in the deploy logs?
Want results from more Discord servers?
Add your server