Closed Sangarllo closed 3 years ago
Update angular.json file
"deploy": { "builder": "@angular/fire:deploy", "options": { "ssr": true, "functionsNodeVersion": 12 } }
Thank you @akilah007. Your configuration helped to show my SSR function in firebase as Node 12, but i got the solution with this steps:
Solved with these steps:
Version info
Angular: 11.1 Firebase: "^7.0 || ^8.0" AngularFire: "^6.1.4" Node: 14.0.0
How to reproduce these conditions
Repo in GitHub. Issue in StackOverflow.
Steps to set up and reproduce
app.component.ts
andapp.module.ts
following Getting Started with AngularFire instructions.My
app.module
file:Debug output
In development mode (in localhost) everything is fine:
or
Expected behavior
ng deploy
should deploy PWA app in firebase-hosting, and SSR as firebase-functionActual behavior
ng deploy
retrieves error "Functions did not deploy properly", and "Functions deploy had errors with the following functions: ssr" with no useful details:Extra info
AngularFireModule.initializeApp(environment.firebase)
from app.module, features as Firestore doesn't work (of course), butng deploy
works fine and SSR is deployed as firebase function