R
Railway11mo 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
Percy11mo ago
Project ID: N/A
maddsua
maddsua11mo ago
just to be clear, why type of computer/os version are you running?
shiama
shiamaOP11mo ago
computer windows 10
maddsua
maddsua11mo 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
shiamaOP11mo ago
it needs update 64
maddsua
maddsua11mo ago
I mean it's not mac with windows on top of it or whatever?
shiama
shiamaOP11mo ago
no not mac ok please the link of github
maddsua
maddsua11mo 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
shiamaOP11mo ago
yes please cuz when i click on the exe it close fast not work
maddsua
maddsua11mo 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
maddsua11mo ago
No description
maddsua
maddsua11mo 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
shiamaOP11mo ago
not work for me
maddsua
maddsua11mo 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
maddsua11mo 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
maddsua11mo ago
after that try running railway
No description
maddsua
maddsua11mo ago
if that doesn't work it's probably something wrong with file name any luck?
Brody
Brody11mo ago
I don't endorse using fly*
maddsua
maddsua11mo ago
but the frog man does....
Brody
Brody11mo ago
frog man is silly
shiama
shiamaOP11mo 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
maddsua11mo 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
shiamaOP11mo ago
No description
shiama
shiamaOP11mo 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
maddsua11mo ago
yeah that's why I gave you steps how to install the cli without npm by downloading it directly from release page
shiama
shiamaOP11mo ago
can you make video iam failed to do the steps
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
@madhdsua
maddsua
maddsua11mo 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
shiamaOP11mo ago
No description
maddsua
maddsua11mo ago
yeah you'd need to remove those in appdata/roaming/npm first
shiama
shiamaOP11mo ago
ok
maddsua
maddsua11mo ago
it's basically just a broken install npm sometimes just does that
shiama
shiamaOP11mo ago
i removed
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
then i should do the same write railway
maddsua
maddsua11mo ago
were you able to add the path environment variable?
shiama
shiamaOP11mo ago
one second
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
.
maddsua
maddsua11mo ago
looks about right now if you run where railway what's the output?
shiama
shiamaOP11mo ago
one second
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
.
maddsua
maddsua11mo ago
interesting and just to be clear you did reboot the computer? I feel like a tech support guy rn 😂
shiama
shiamaOP11mo ago
no i didnt
maddsua
maddsua11mo ago
oh, when you add that for the first time it won't apply until computer is restarted it's windows 🤷‍♂️
shiama
shiamaOP11mo ago
ok i will reboot it and come
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
when i removed the files npm i didnt do anything yet
maddsua
maddsua11mo ago
thonk
shiama
shiamaOP11mo ago
and when i write railway
No description
maddsua
maddsua11mo ago
does it at least run if you launch cmd from the directory itself? like here
shiama
shiamaOP11mo ago
like this
maddsua
maddsua11mo 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
shiamaOP11mo ago
@Brody]
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
done
maddsua
maddsua11mo ago
nice so what was the key?
shiama
shiamaOP11mo ago
iam idiot the programe i made it
maddsua
maddsua11mo ago
name had a typo in it?
shiama
shiamaOP11mo ago
railway.exe
maddsua
maddsua11mo ago
oh classic lmao
shiama
shiamaOP11mo ago
and i wrote in cmd railway i remove .exe ....
maddsua
maddsua11mo ago
yeah got it I have extensions shown by default for situations like that
shiama
shiamaOP11mo ago
bro when i want to make the bot run from specified file the main file i mean what should i do
maddsua
maddsua11mo 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
shiamaOP11mo ago
node.js
maddsua
maddsua11mo ago
ohhhh that's noice even better same thing but here you need the packages json to have a start command
shiama
shiamaOP11mo ago
aha
maddsua
maddsua11mo ago
literally a script called start
shiama
shiamaOP11mo ago
ok yes start.js
maddsua
maddsua11mo ago
doesn't matter how the module is called railway will look into package.json to find it
shiama
shiamaOP11mo ago
ok how can i restart the bot
maddsua
maddsua11mo ago
there's a restart button in the dashboard if that's what you're looking for
shiama
shiamaOP11mo ago
where is dashborad
shiama
shiamaOP11mo ago
No description
shiama
shiamaOP11mo ago
this
maddsua
maddsua11mo ago
No description
maddsua
maddsua11mo ago
click on the service
shiama
shiamaOP11mo ago
ok is there console make me write in it
maddsua
maddsua11mo ago
nah no console
shiama
shiamaOP11mo ago
No description
Want results from more Discord servers?
Add your server