Firebase key env var is undefined
ntrejo12
FREEOP

7 months ago

Project ID: 2e3ec74d-79cb-4540-9075-b1f15516cbd6

Hi everyone. This is my first time using Railway and first time trying to build a backend server. For some reason my firebase_private_key is coming through as undefined, here is the error from the logs:

file:///app/src/services/firebase.js:12

private_key: process.env.FIREBASE_PRIVATE_KEY.replace(/\n/g, '\n'),

^

TypeError: Cannot read properties of undefined (reading 'replace')

Im not sure why its undefined though, I added my variables under the service variables. Any help or guidance would be greatly appreciated 🙏

Solved$10 Bounty

2 Replies

ntrejo12
FREEOP

7 months ago

Nevermind, I think I figured it out! I never hit deploy after adding the env variables 😓


7 months ago

!s


Status changed to Solved brody 7 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...