diff --git a/packages/database/src/api/Database.ts b/packages/database/src/api/Database.ts index 3b89056a4ad..bb56e3d3e1a 100644 --- a/packages/database/src/api/Database.ts +++ b/packages/database/src/api/Database.ts @@ -128,7 +128,7 @@ export function repoManagerDatabaseFromApp( let isEmulator: boolean; let dbEmulatorHost: string | undefined = undefined; - if (typeof process !== 'undefined') { + if (typeof process !== 'undefined' && process.env) { dbEmulatorHost = process.env[FIREBASE_DATABASE_EMULATOR_HOST_VAR]; }