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

iamenochchirimaHOBBY

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


iamenochchirimaHOBBY

a year ago

Version 3.5.2


a year ago

Would you happen to have a RAILWAY_ENV environment variable set?


iamenochchirimaHOBBY

a year ago

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


iamenochchirimaHOBBY

a year ago

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


linhHOBBY

a year ago

The same issue that which NodeJs project

Attachments


zerbinidamataTRIAL

a year ago

same issue on version 3.7.0


manicar2093PRO

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-kohliTRIAL

10 months 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


10 months ago

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


simranpal-kohliTRIAL

10 months 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-kohliTRIAL

10 months ago

railway link

> Select a project considerate-smile

> Select an environment production


10 months ago

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


simranpal-kohliTRIAL

10 months ago

I tried on 3.11.0 but same error there also


10 months ago

Please run `railway link` before `railway up`


ramadhanulTRIAL

10 months 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-kohliTRIAL

10 months ago

Thank you @ramadhanul, that helped me solve the issue


10 months 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 10 months ago


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