Firebase key env var is undefined

ntrejo12
FREEOP

19 days 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 firebaseprivatekey is coming through as undefined, here is the error from the logs:

file:///app/src/services/firebase.js:12
privatekey: process.env.FIREBASEPRIVATE_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

0 Replies

ntrejo12
FREEOP

19 days ago

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


19 days ago

!s


Status changed to Solved brody 19 days ago


Loading...
Firebase key env var is undefined - Railway Help Station