Getting code 404 not found after linking my project and running railway up.

iamenochchirima
HOBBY

a year ago

enoch@DESKTOP-JT3AM89:/mnt/c/Users/Enoch/OneDrive/Desktop/Workspace/impact-chain/impactchain/server$ railway up 
  Indexed                                                                                                       
  Compressed [====================] 100%                                                                        
  Failed                                                                                                        
Failed to upload code with status code 404 Not Found

That's what I'm getting.

I have a single repository with frontend and backend directories, client and server, client with reactjs and server with back node and express. I intend to only deploy the server on railway.

At first I did railway link in the server directory, it didn't work, I then did it again in the root of the repository but I'm still getting the error. I had created an empty project on railway, had set the root directory to server/.

What am doing wrong?

Thank you!

Solved

20 Replies

a year ago

What version of the CLI are you using? railway --version


iamenochchirima
HOBBY

a year ago

Version 3.5.2


a year ago

Would you happen to have a RAILWAY_ENV environment variable set?


iamenochchirima
HOBBY

a year ago

No I don't have, I just run railway Link


iamenochchirima
HOBBY

a year ago

Where should should I put it and what should I put inside? My environmenatl variables?


linh
HOBBY

a year ago

The same issue that which NodeJs project

Attachments


zerbinidamata
TRIAL

a year ago

same issue on version 3.7.0


manicar2093
PRO

a year ago

Yep, same issue on version 3.7.0. :sad:

I have created an issue on GitHub cli repo: https://github.com/railwayapp/cli/issues/497


Thanks for the reports - we're looking into it.

In the meantime, could you try clearing the config file?

$ rm ~/.railway/config.json

a year ago

For those still experiencing the issue, can you please upgrade to version 3.8.1 of the cli (https://github.com/railwayapp/cli/releases/tag/v3.8.1) and deploy with railway up --verbose. It will show some details about the deploy that will be useful in debugging why it is failing.


simranpal-kohli
TRIAL

a year ago

railway up --verbose

> Select a service to deploy to loving-beauty

Indexed Compressed [====================] 100% railway up

service: 074b992b-2ab5-4e3e-b7b2-239a32925b73

environment: d6ce6662-d1f8-432e-9041-c74d6dc79f08

bytes: 5229

url: https://backboard.railway.app/project/721f11a1-4c33-40d9-b131-786c66e3575c/environment/d6ce6662-d1f8-432e-9041-c74d6dc79f08/up?serviceId=074b992b-2ab5-4e3e-b7b2-239a32925b73

Failed Failed to upload code with status code 404 Not Found


a year ago

Can you please try running `railway link` before the up command?


simranpal-kohli
TRIAL

a year ago

I did run railway link
I had 3.11.0, but now I downgraded to 3.8.1 but still the same issue
Locally, with railway run tox run -e run its running fine.


simranpal-kohli
TRIAL

a year ago

railway link

> Select a project considerate-smile

> Select an environment production


a year ago

Please make sure you are on the latest version of the CLI as we can not provide support for old versions.


simranpal-kohli
TRIAL

a year ago

I tried on 3.11.0 but same error there also


a year ago

Please run `railway link` before `railway up`


ramadhanul
TRIAL

a year ago

Hi i think i can help you. you can chose empty service first in your project after that deploy that empty service. The next one you can "railway link" and will be chosee your project -> environment -> service . After that you can railway run


simranpal-kohli
TRIAL

a year ago

Thank you @ramadhanul, that helped me solve the issue


a year ago

Glad you were able to solve, but they just explained what happens when you run `railway link` as I suggested.


Status changed to Solved brody 12 months ago


Getting code 404 not found after linking my project and running railway up. - Railway Help Station