Update angularfire2 to @angular/fire, getting rid of Angular 4 transitive dependencies
MrCsabaToth opened this issue · 5 comments
We are having trouble getting the LA DevFest site running. In the past I just ignored the transitive unfulfilled Angular 4 npm dependencies, we are already on Angular 6.1.x+. However the LA DevFest throws JavaScript error.
Basically this would be a successor of the almost recent npm package updates, and we'd get rid of the angularfire2/database-deprecated
imports in favor of @angular/fire...
.
Expected Behavior
The project would use some more recent packages i some areas and the bootstrap of it would be even more robust.
Current Behavior
LA DevFest freshly forked website compiles, but JS error when site visited.
Possible Solution
Trying to run ahead and hoping that the upgrade would eventually solve the JS errors.
Steps to Reproduce
- Fork the repo
- Perform the described installation and deployment / hosting modifications
- JS error
Context (Environment)
I can provide more details but it was reproduced both on Matt Kaufmann's machine + my machine, as well as at some point it rendered the live site inoperable. Fortunately we could roll back to the last working snapshot with Firebase hosting's features.
Details
angularfire2's obsolete dependencies:
npm WARN angularfire2@5.0.0-rc.3 requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.3 requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.3 requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.3 requires a peer of @angular/platform-browser-dynamic@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
Here is a WIP (Work in Progress) fork: CsabaConsulting@fd2efa2
Issues in the WIP version:
- Some of the
snapshotChanges()
may need to bevalueChanges()
- Maybe I should store the result of the
valueChanges()
(Observable
type) instead ofAngularFireList<x>
. This way I don't have to callvalueChanges()
anywhere else, but then what would I do at the non eliminatedsnapshotChanges()
situations? - It throws a different JS error than the one which induced this issue. But I suspect once we resolve all parts we'll be out of the woods and DeLorean will benefit from the changes.
I keep working on a fork off of the LA DevFest fork (https://github.com/CsabaConsulting/DeLorean-v2). The site does not throw such JS errors any more what triggered this issue, but still several parts don't work. We need help.
@neojato can you take a look?
Also note https://github.com/neojato/DeLorean-v2/tree/angularFire2-v5
Oh, scratch that, that branch is Angular 4.0 based...