Skip to content

Angular 19 SSR with Firebase hosting or Firebase App Hosting Fail #8141

@hittten

Description

@hittten

Deploy angular 19 on firebase hosting or firebase app hosting, not working. But also, if you have an Angular 19 project already created and you run Firebase init, then select the hosting, the Firebase CLI does not create the firebase.json file, instead, it asks you if you want to create a framework. It does not recognize that it is in Angular 19.

Then even by manually putting the firebase.json file and deploying we have several errors on the server.

[REQUIRED] Environment info

firebase-tools:

13.29.1 Or 13.29.2

Platform:
macOS: 15.2 (24C101)

[REQUIRED] Test case

You can go to https://github.com/hittten/angular19ssr

[REQUIRED] Steps to reproduce

git clone --branch ssr-config https://github.com/hittten/angular19ssr.git

npm install

firebase init

// before this point it should recognize the framework

=== Hosting Setup
? Do you want to use a web framework? (experimental) Yes
? What folder would you like to use for your web application's root directory? .
Could not determine the web framework in use.
? Please choose the framework: (Use arrow keys)
❯ Angular
Lit
Next.js
Nuxt
Preact
Svelte

Then even by manually putting the firebase.json file (if you go to main branch you will see the firebase.json file) and deploying we have several errors on the server.

[REQUIRED] Expected behavior

Work on Firebase hosting

[REQUIRED] Actual behavior

The deployment works, i.e. the app deploys without any problem, but then it doesn't work as it should. Error messages are seen in the logs:

INFO 2025-01-26T15:01:32.227333Z Default STARTUP TCP probe succeeded after 1 attempt for container "worker" on port 8080.
DEFAULT 2025-01-26T15:01:32.438634Z Unhandled rejection
ERROR 2025-01-26T15:01:32.439053Z TypeError: app is not a function at /workspace/bootstrap.js:10:19
WARNING 2025-01-26T15:01:32.703852737Z Container called exit(16).
ERROR 2025-01-26T15:01:32.704115Z Error: Process exited with code 16 at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:96:22) at process.emit (node:events:518:28) at process.emit (node:domain:489:12) at process.exit (node:internal/process/per_thread:185:15) at sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:49:9) at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:89:44) at process.emit (node:events:518:28) at process.emit (node:domain:489:12) at emitUnhandledRejection (node:internal/process/promises:250:13) at throwUnhandledRejectionsMode (node:internal/process/promises:385:19)
{
"textPayload": "Error: Process exited with code 16\n at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:96:22)\n at process.emit (node:events:518:28)\n at process.emit (node:domain:489:12)\n at process.exit (node:internal/process/per_thread:185:15)\n at sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:49:9)\n at process. (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:89:44)\n at process.emit (node:events:518:28)\n at process.emit (node:domain:489:12)\n at emitUnhandledRejection (node:internal/process/promises:250:13)\n at throwUnhandledRejectionsMode (node:internal/process/promises:385:19)",

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions