Skip to content

NodeJs crashes when using along Angular Universal #2533

@gcamara

Description

@gcamara

Version info

Angular: 10

Firebase: 8.4.3

AngularFire: 6.0.2

How to reproduce these conditions

Steps to set up and reproduce

  1. Create a new Angular project (or use an existing one)
  2. Install Angular Universal dependencies
    ng add @nguniversal/express-engine
  3. Install Angular Fire dependencias
    ng add @angular/fire
  4. Setup the project following the quickstart guide
  5. Create a simple service injecting AngularFireDatabase
  6. Create a function that returns database.list().valueChanges() or database.list().stateChanges() observable
  7. Create a function on any component that consumes the early created service
  8. Run npm run dev:ssr

At this point, some warnings are fired, but they can be easily solved by adding dependencies on angular.json file.
The project builds smoothly, but the application crashes when opened in browser.

IMPORTANT
The same does not happen when running via ng serve command

Debug output

Warnings
image

App Crashing
image

Expected behavior

The application keeps running

Actual behavior

The application crashes on open

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions