R
Railway10mo ago
shiama

what is the solution for this error ?

when i use npm i -g @railway/cli this error appear in photo for discord bot why ??
No description
83 Replies
Percy
Percy10mo ago
Project ID: N/A
maddsua
maddsua10mo ago
just to be clear, why type of computer/os version are you running?
shiama
shiama10mo ago
computer windows 10
maddsua
maddsua10mo ago
I'd expect it to pick the x86_64 version but it goes with i686 for some reason a real quick fix for it would be downloading cli directly from github
shiama
shiama10mo ago
it needs update 64
maddsua
maddsua10mo ago
I mean it's not mac with windows on top of it or whatever?
shiama
shiama10mo ago
no not mac ok please the link of github
maddsua
maddsua10mo ago
ok, so my quick fix for it would be here: https://github.com/railwayapp/cli/releases/tag/v3.5.2 (release page) and the file that I think should be good for a modern windows pc: https://github.com/railwayapp/cli/releases/download/v3.5.2/railway-v3.5.2-x86_64-pc-windows-msvc.zip do you need assistance with setting up env PATH so that it would run in command line properly?
shiama
shiama10mo ago
yes please cuz when i click on the exe it close fast not work
maddsua
maddsua10mo ago
yeah that's how command line tools work outside of shell ok, I'm typing =) 1. Create a directory to hold this (and probably in the future other tools). I generally keep it all in C:\Users\maddsua\cli but you can use literally any directory for it, just keep in mind not to delete it and that any executable inside can be called from cmd as a command. 2. Extract railway-cli in there. if the .exe has a name with version or any other things in it just rename it to railway.exe so that it can be called from cmd by it's name 3. Now you'd need to add this entire directory to PATH environment variable. To do so follow these steps: 1. Open My computer 2. Right click and select "properties" 3. Click "advanced system settings" in top left of the window 4. Just abot Ok and Cancle buttons you'd see "environment variables". Click this one 5. Then select "path" and click "edit" 6. Paste cli directory path in there, save it all and that's it! Now doing the screenshots
maddsua
maddsua10mo ago
No description
maddsua
maddsua10mo ago
it's a good thing you're no windows, setting this up is a bit more tricky on linux HAHAHA know how it's going literally had to explain this to my friend today, but for fly.io Brody does not endorse installing cli from binary. noted.
shiama
shiama10mo ago
not work for me
maddsua
maddsua10mo ago
does it not see the executable? it may require rebooting the pc but I'm not totally sure what you can also try is opening a cmd right in the directory where railway-cli is located and calling it from there
maddsua
maddsua10mo ago
click on directory path like here, type "cmd" in there and press enter. this will open a command line inside that directory
No description
No description
maddsua
maddsua10mo ago
after that try running railway
No description
maddsua
maddsua10mo ago
if that doesn't work it's probably something wrong with file name any luck?
Brody
Brody10mo ago
I don't endorse using fly*
maddsua
maddsua10mo ago
but the frog man does....
Brody
Brody10mo ago
frog man is silly
shiama
shiama10mo ago
dont reveal bro i want to host my discord bot in railway there are steps i go on them first i should npm install for node_modules second i use this npm i -g @railway/cli from your website npm this step doesnt work with me this is all
maddsua
maddsua10mo ago
can you tell me which step is not working? is the cli not launch at all or it doesn't work from env?
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
this i should take npm i -g @railway/cli and put it in terminal in visual studio and when i put it =and press enter this error occur in the photo
maddsua
maddsua10mo ago
yeah that's why I gave you steps how to install the cli without npm by downloading it directly from release page
shiama
shiama10mo ago
can you make video iam failed to do the steps
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
@madhdsua
maddsua
maddsua10mo ago
oh damn npm really broke it on your pc run where railway it will show all the locations where system sees an executable called railway and just nuke the ones that were created by npm
shiama
shiama10mo ago
No description
maddsua
maddsua10mo ago
yeah you'd need to remove those in appdata/roaming/npm first
shiama
shiama10mo ago
ok
maddsua
maddsua10mo ago
it's basically just a broken install npm sometimes just does that
shiama
shiama10mo ago
i removed
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
then i should do the same write railway
maddsua
maddsua10mo ago
were you able to add the path environment variable?
shiama
shiama10mo ago
one second
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
.
maddsua
maddsua10mo ago
looks about right now if you run where railway what's the output?
shiama
shiama10mo ago
one second
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
.
maddsua
maddsua10mo ago
interesting and just to be clear you did reboot the computer? I feel like a tech support guy rn 😂
shiama
shiama10mo ago
no i didnt
maddsua
maddsua10mo ago
oh, when you add that for the first time it won't apply until computer is restarted it's windows 🤷‍♂️
shiama
shiama10mo ago
ok i will reboot it and come
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
when i removed the files npm i didnt do anything yet
maddsua
maddsua10mo ago
thonk
shiama
shiama10mo ago
and when i write railway
No description
maddsua
maddsua10mo ago
does it at least run if you launch cmd from the directory itself? like here
shiama
shiama10mo ago
like this
maddsua
maddsua10mo ago
well, Brody is a big windows boi here we need ur help I have no idea why it doesn't see the damn executable too bad can't tag him directly
shiama
shiama10mo ago
@Brody]
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
done
maddsua
maddsua10mo ago
nice so what was the key?
shiama
shiama10mo ago
iam idiot the programe i made it
maddsua
maddsua10mo ago
name had a typo in it?
shiama
shiama10mo ago
railway.exe
maddsua
maddsua10mo ago
oh classic lmao
shiama
shiama10mo ago
and i wrote in cmd railway i remove .exe ....
maddsua
maddsua10mo ago
yeah got it I have extensions shown by default for situations like that
shiama
shiama10mo ago
bro when i want to make the bot run from specified file the main file i mean what should i do
maddsua
maddsua10mo ago
python, right? a lot of the time railway can automatically detect what framework is used so if there's a main.py railway will try to run it you'd just need to railway up that thing and then set a PORT variable in the dashboard to expose the app to the internet
shiama
shiama10mo ago
node.js
maddsua
maddsua10mo ago
ohhhh that's noice even better same thing but here you need the packages json to have a start command
shiama
shiama10mo ago
aha
maddsua
maddsua10mo ago
literally a script called start
shiama
shiama10mo ago
ok yes start.js
maddsua
maddsua10mo ago
doesn't matter how the module is called railway will look into package.json to find it
shiama
shiama10mo ago
ok how can i restart the bot
maddsua
maddsua10mo ago
there's a restart button in the dashboard if that's what you're looking for
shiama
shiama10mo ago
where is dashborad
shiama
shiama10mo ago
No description
shiama
shiama10mo ago
this
maddsua
maddsua10mo ago
No description
maddsua
maddsua10mo ago
click on the service
shiama
shiama10mo ago
ok is there console make me write in it
maddsua
maddsua10mo ago
nah no console
shiama
shiama10mo ago
No description
Want results from more Discord servers?
Add your server