R
Railwayβ€’2y ago
CSteez903

How to updated railway via terminal

I am unable to connect to railway via terminal. It says I need to update but I am having trouble with that.
Solution:
This right here tells you everything npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator....
Jump to solution
38 Replies
Percy
Percyβ€’2y ago
Project ID: N/A
CSteez903
CSteez903OPβ€’2y ago
Money Alertz railway version A newer version of the Railway CLI is available, please update to: v3.3.1 railway version 2.0.10 ➜ Money Alertz
CSteez903
CSteez903OPβ€’2y ago
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
CSteez903
CSteez903OPβ€’2y ago
project ID: 86d80cd8-7d21-4368-a342-4fc1d8b87270
MantisInABox
MantisInABoxβ€’2y ago
From what you posted in chit-chat, it looks like you don't have permission to write to that folder... Try running the command again with admin privilege maybe?
CSteez903
CSteez903OPβ€’2y ago
i have admin lol Last login: Fri Jun 2 12:36:53 on ttys000 ➜ Money Alertz railway link A newer version of the Railway CLI is available, please update to: v3.3.1 🚨 There was a problem fetching your projects. One of our trains probably derailed! ➜ Money Alertz I am not doing anything different
MantisInABox
MantisInABoxβ€’2y ago
What operating system are you using?
CSteez903
CSteez903OPβ€’2y ago
mac os monterey npm i -g @railway/cli that is the command i am trying to use to update also tried homebrew nothing has worked
Brody
Brodyβ€’2y ago
try uninstalling the cli first
CSteez903
CSteez903OPβ€’2y ago
how do i do that Money Alertz npm i -g @railway/cli npm ERR! code EACCES npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/@railway/cli npm ERR! dest /usr/local/lib/node_modules/@railway/.cli-ilS5kG12 npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@railway/cli' -> '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12' npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@railway/cli' -> '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'rename', npm ERR! path: '/usr/local/lib/node_modules/@railway/cli', npm ERR! dest: '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: /Users/sparklingclean/.npm/_logs/2023-06-02T17_38_50_662Z-debug-0.log ➜ Money Alertz
➜ Money Alertz
MantisInABox
MantisInABoxβ€’2y ago
Based on npm ERR! the command again as root/Administrator. it tells me you should probably try sudo
CSteez903
CSteez903OPβ€’2y ago
➜ Money Alertz npm uninstall railway
up to date, audited 322 packages in 2s 35 packages are looking for funding run npm fund for details 1 critical severity vulnerability To address all issues, run: npm audit fix Run npm audit for details. ➜ Money Alertz
Brody
Brodyβ€’2y ago
now check if it was uninstalled
CSteez903
CSteez903OPβ€’2y ago
➜ Money Alertz npm uninstall railway
up to date, audited 322 packages in 2s 35 packages are looking for funding run npm fund for details 1 critical severity vulnerability To address all issues, run: npm audit fix Run npm audit for details. ➜ Money Alertz railway link A newer version of the Railway CLI is available, please update to: v3.3.1 🚨 There was a problem fetching your projects. One of our trains probably derailed! ➜ Money Alertz
Brody
Brodyβ€’2y ago
please follow the docs page i linked
CSteez903
CSteez903OPβ€’2y ago
I did Is railway scoped
Brody
Brodyβ€’2y ago
no you didnt
CSteez903
CSteez903OPβ€’2y ago
Pardon me I am not a pro at this what did I do wrong
Brody
Brodyβ€’2y ago
you dont need to be a pro to read docs
CSteez903
CSteez903OPβ€’2y ago
The g
Brody
Brodyβ€’2y ago
npm uninstall -g @railway/cli
CSteez903
CSteez903OPβ€’2y ago
& you need customer service training I just asked you if it was scoped or not
Brody
Brodyβ€’2y ago
i am not customer service
CSteez903
CSteez903OPβ€’2y ago
I don’t know that stuff
Brody
Brodyβ€’2y ago
theres nothing wrong with not knowing, but thats what the docs are for
Adam
Adamβ€’2y ago
What do you mean by this?
CSteez903
CSteez903OPβ€’2y ago
➜ ~ npm uninstall -g @railway/cli npm ERR! code EACCES npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/@railway/cli npm ERR! dest /usr/local/lib/node_modules/@railway/.cli-ilS5kG12 npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@railway/cli' -> '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12' npm ERR! [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/@railway/cli' -> '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'rename', npm ERR! path: '/usr/local/lib/node_modules/@railway/cli', npm ERR! dest: '/usr/local/lib/node_modules/@railway/.cli-ilS5kG12' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: /Users/sparklingclean/.npm/_logs/2023-06-02T18_04_52_697Z-debug-0.log ➜ ~
Solution
MantisInABox
MantisInABoxβ€’2y ago
This right here tells you everything npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
MantisInABox
MantisInABoxβ€’2y ago
Try running the command with sudo in front of it
CSteez903
CSteez903OPβ€’2y ago
@Brody How is this solved it's asking me for a password i use github to login
Brody
Brodyβ€’2y ago
why are you completely ignoring vin?
MantisInABox
MantisInABoxβ€’2y ago
sudo is your computer password, not railway password
Brody
Brodyβ€’2y ago
bruh
CSteez903
CSteez903OPβ€’2y ago
➜ ~ sudo npm i -g @railway/cli added 17 packages in 2s 3 packages are looking for funding run npm fund for details ➜ ~ npm fund sparklingclean ➜ ~ that that's is what i said when i tried to install using sudo npm i -g @railway/cli
MantisInABox
MantisInABoxβ€’2y ago
Because it did the install. It diidn't give you the permission error.
CSteez903
CSteez903OPβ€’2y ago
Yeah it's working now, thanks @Vin
MantisInABox
MantisInABoxβ€’2y ago
Yup
Want results from more Discord servers?
Add your server