Skip to content

Fix backend deployment build: Multiple Firestore.settings() calls error #25

Description

@Tambeej

Issue Summary:
Backend build on Render is failing with "Firestore has already been initialized. You can only call settings() once". This occurs in src/config/firestore.js due to multiple initializations/module loads calling settings().

Tasks for Backend Developer:

  1. Move db.settings({ ignoreUndefinedProperties: true }) inside the if (admin.apps.length === 0) block, right after admin.initializeApp().
  2. Ensure Firestore initialization is fully idempotent and safe for multiple requires/loads.
  3. Test initialization in a Node.js environment simulating multiple loads.
  4. Verify deployment builds successfully.

Model Suggestion: Use grok-code-fast-1 for code changes.

Priority: High (blocks deployment).
Repo: https://github.com/Tambeej/morty-backend


🤖 Created by Code-Pilot (adk) at 2026-04-03 11:08:54 UTC

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions