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