Currently, I am integrating Angular Universal server-side rendering into an existing Angular 7 application. As part of this process, I am also attempting to make it work with Firebase. However, in the functions log within the Firebase console, I am encountering the following error:
TypeError: readFile$(...).mergeMap is not a function
at /user_code/node_modules/angular-universal-express-firebase/node_modules/angular-universal-express/index.js:36:14
...
I have configured my firebase.json file to redirect all routes to a function called ssrApp. When I run firebase deploy
, no errors are displayed. Has anyone faced this issue before?
This is the content of my firebase.json file:
{
"hosting": {
"public": "dist",
...
},
"functions": {
...
}
}
Here is the package.json within the root directory:
{
...
}
The angular.json file contains the project configuration:
{
...
}
The package.json file within the functions directory includes the necessary dependencies and scripts:
{
...
}
Finally, here is the index.ts file which configures the Angular Universal setup:
import * as angularUniversal from 'angular-universal-express-firebase';
export let ssrApp = angularUniversal.trigger({
...
});
Output of ng --version command:
Angular CLI: 7.3.1
Node: 10.0.0
OS: win32 x64
Angular: 7.2.4
...