SSR Angular Universal 12 and Firebase troubles #2877
Replies: 4 comments 3 replies
This comment has been hidden.
This comment has been hidden.
-
If you update your Firebase JS SDK to the latest version I don't think you need the proto-loader or to bundle the dependencies anymore. I'm going to be testing this more now that I'm back from leave. |
Beta Was this translation helpful? Give feedback.
-
Hi @jamesdaniels , I wonder if you had any time to investigate a bit in this blocking issue. From my side, I'll be able to test latest versions of firebase. What package from firebase should I update ? Only firebase ? |
Beta Was this translation helpful? Give feedback.
-
Hi @JamesDaniel, I upgraded as suggested to latest version of firebase sdk and removed the code for dealing with protos, and added the externaldependencies within the
From
What I find odd is that the output of More over, to get to this point I added in I also, as suggested, updated to latest version my Yesterday, I updated to latest version of nrwl/nx (v.12.3.6). Initially, I was with 12.0.6. I also checked the proposed link for debug from NX https://nx.dev/guides/webpack-5, and tried to install webpack-5 plugins for node apps, as the
I had to revert it back with So, basically, I'm back with what seems to be the root cause of 1st set of logs:
Do you happen to have some clues to proceed further with that migration ng11 -> ng12 ? Something clearly broke our deploy process:
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
Not sure if this is a bug for AngularFire to be honest, but this might be the case so, here it is.
I have an app which i could deploy with Angular 11 and Firebase.
I had to put in place the solution with protos described in #2686.
As you can see, the
firestore-protos.ts
file returnsfile-loader?name=...
, which is a command for webpack 4, with the loaderfile-loader
.But, in Angular 12, webpack 4 is gone, and we have webpack 5 support, awesome! But, the solution with
dir-loader!./firestore-protos
simply doesn't work any more.1st encountered issue:
I get this error:
And the line in the
dir-loader
lib:So, I've been looking for a solution for quite some time now and I really can't find anything on the subject.
I saw that in the
sample
app example fromangularfire
repo, @jamesdaniels removed the use of dir-loader, which seems a good option indeed.What's the best workaround to do the same thing as the couple [dir-loader / file-loader] to load firestore protos ?
2nd encountered issue:
I also tried to just remove the use of
dir-loader
by adding a list ofexternalDependencies
in theangular.json
file, just like this:But when I try this, I get another error when building my cloud function (well, it's more a Warning at first, but later on deployment it turns into an error):
The problem here is that the main.js files in the 'fr' or 'en' folder are all minified so I can't know exactly the origin of the problem.
A note: the
functions
app is a node app in our monorepo, which contains the cloud functions to deploy.And a reminder: everything deploys correctly with Angular Universal 11, and after upgrade to version 12, it stopped at build time for the Cloud Function part.
Also: I did manage to easily migrate all other apps from the monorepo from Angular 11 to Angular 12. All apps started locally, build, and deployed without trouble.
So, I really narrowed down to the problem to SSR Universal, with AngularFire and Firebase (which is kind of very large scope, i know ^^).
Version info
Angular: 12
Firebase: 8.6.1
AngularFire: 6.1.5
Node: 12.22.3 (same in 14.17.3)
** Windows 10 **
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Expected behavior
I expect the SSR Universal to not broke the workflow, when dealing with those protos / dir-loader / webpack 5.
Actual behavior
It's a no go for now for the adoption of Angular 12, because of those points.
Beta Was this translation helpful? Give feedback.
All reactions