Firebase App Hosting tries to use Node.js buildpack for Python app – ignores app.yaml / Procfile / requirements.txt
20:15 22 Jan 2026

I’m trying to deploy a Python Flask app using Firebase App Hosting, but the deployment consistently fails because Google Cloud Build incorrectly detects the app as Node.js, even though everything in the project is configured for Python.

🔧 What I’ve done so far:

  • Created a main.py file with a valid Flask app (app = Flask(__name__)).

  • Added requirements.txt with:

    Flask
    gunicorn
    python-dotenv
    PyPDF2
    
    
  • Tried all the following configurations (separately):

    1. apphosting.yaml with just:

      runtime: python
      
      
    2. Procfile with:

      web: gunicorn -w 4 -b 0.0.0.0:8080 main:app
      
      
    3. firebase.json:

      {
        "apphosting": {
          "backendId": "mojbackendgetthecall",
          "source": ".",
          "runCommand": "gunicorn -w 4 -b 0.0.0.0:8080 main:app",
          "ignore": ["node_modules", ".git"]
        }
      }
      
      
    4. Even app.yaml (App Engine format) with:

      runtime: python
      entrypoint: gunicorn -w 4 -b 0.0.0.0:8080 main:app
      
      

No matter what I try, the build fails with Node.js detection errors, and it never recognizes Python.


❌ Build Error:

======== Output: google.nodejs.runtime@1.0.0 ========
Nodejs version not specified, using the latest available Nodejs runtime for the stack "ubuntu2204"
Opting out: neither package.json nor any .js files found

======== Output: google.config.entrypoint@0.9.0 ========
Opting out: GOOGLE_ENTRYPOINT not set, no valid entrypoint in app.yaml and Procfile not found

======== Results ========
fail: google.nodejs.runtime@1.0.0
fail: google.config.entrypoint@0.9.0
pass: google.utils.label-image@0.0.2

ERROR: No buildpack groups passed detection.
ERROR: failed to detect: buildpack(s) failed with err
ERROR: failed to build: executing lifecycle: failed with status code: 21
ERROR: build step 2 "gcr.io/k8s-skaffold/pack" failed: step exited with non-zero status: 1

Build logs:
https://console.cloud.google.com/cloud-build/builds;region=europe-west4/02bc5c1a-d533-4779-8cb7-495c2b17c32f?project=227267397854


📌 What I suspect:

It seems like my Firebase project was originally initialized as a Node.js project, and some internal configuration still "remembers" this – so the Cloud Build system keeps using Node.js buildpacks despite the Python config being present and correct.


❓ Question:

How can I force Firebase / Cloud Build to correctly recognize this as a Python app, not Node.js?

Is there a way to fully reset the backend environment or override detection to guarantee Python is used?

Thanks in advance for any help — I’ve tried everything I could think of.

firebase google-cloud-build firebase-app-hosting