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:Jump to 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.
...38 Replies
Project ID:
N/A
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
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.
project ID: 86d80cd8-7d21-4368-a342-4fc1d8b87270
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?
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
What operating system are you using?
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
try uninstalling the cli first
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
β Money Alertz
Based on
npm ERR! the command again as root/Administrator.
it tells me you should probably try sudo
β Money Alertz npm uninstall railway
up to date, audited 322 packages in 2s 35 packages are looking for funding run
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 Alertznow check if it was uninstalled
β Money Alertz npm uninstall railway
up to date, audited 322 packages in 2s 35 packages are looking for funding run
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 Alertzplease follow the docs page i linked
I did
Is railway scoped
no you didnt
Pardon me I am not a pro at this what did I do wrong
you dont need to be a pro to read docs
The g
npm uninstall -g @railway/cli
& you need customer service training
I just asked you if it was scoped or not
i am not customer service
I donβt know that stuff
theres nothing wrong with not knowing, but thats what the docs are for
What do you mean by this?
β ~ 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
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.
Try running the command with
sudo
in front of it@Brody How is this solved
it's asking me for a password
i use github to login
why are you completely ignoring vin?
sudo is your computer password, not railway password
bruh
β ~ 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/cliBecause it did the install. It diidn't give you the permission error.
Yeah it's working now, thanks @Vin
Yup