failed to stat sta /secrets/DATABASE_CLIENT: no such file or directory
gr3ko-x
HOBBYOP

6 months ago

When deploying to Railway, there are two ways environment variables can be handled:

  1. Regular environment variables - Available via process.env.VARIABLE_NAME

  1. Mounted secrets - Files created in a secrets directory with content set to the variable value

    ERROR: failed to build: failed to stat /tmp/railpack-build-3728394563/secrets/DATABASE_CLIENT: stat /tmp/railpack-build-3728394563/secrets/DATABASE_CLIENT: no such file or directory

    in railway I'm facing this issue as i have the DATABASE_CLIENT defined in railway environment variable

$10 Bounty

2 Replies

Railway
BOT

6 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


6 months ago

Are you specifying anywhere to use a secret file vs an env? I see almost no reason to use a file over an env var


Loading...