Environment variables not available during build
molhar
PROOP

a year ago

I have a nextjs service which during the build stage doesn't seem to have the correct environment variables available. In my staging environment I see NODE_ENV set to production and RAILWAY_ENVIRONMENT_NAME undefined.

Should variables normally be available during build? I saw a caveat that only applied to docker builds but this is building from a github repo.

Solved

4 Replies

molhar
PROOP

a year ago

I've tracked this down to a misconfiguration in our turbo config.


Thank you for letting us know. I'll close out this thread.


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved christian about 1 year ago


victorpatru
HOBBY

9 months ago

I ran into the same issue. Turns out you needed to specify in globalEnv in your turbo.json the environment variables that weren't getting picked up in the image. Hopefully that will save someone 30 minutes slightly_smiling_face emoji


Status changed to Awaiting Railway Response Railway 9 months ago


victorpatru

I ran into the same issue. Turns out you needed to specify in globalEnv in your turbo.json the environment variables that weren't getting picked up in the image. Hopefully that will save someone 30 minutes

brody
EMPLOYEE

9 months ago

Or set turbo to loose mode!


Status changed to Awaiting User Response Railway 9 months ago


Railway
BOT

5 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 6 months ago


Loading...