Can't use FieldValue.serverTimestamp() from @firebase/firestore-types
See original GitHub issueVersion info
Angular: 5.2.8 Firebase: 4.11.0 AngularFire: 5.0.0-rc.6 Other (e.g. Ionic/Cordova, Node, browser, operating system): Stackblitz - chrome
How to reproduce these conditions
Open the stackblitz Failing test unit, Plunkr, or JSFiddle demonstrating the problem https://stackblitz.com/edit/angular-lrgmmu
Steps to set up and reproduce Open stackblitz
Sample data and security rules none and allow all
Debug output
Can't find module:
@firebase/firestore-types/index (@0.2.2)
Check your import statements & ensure you're importing the correct module names.
** Errors in the JavaScript console ** none
** Output from firebase.database().enableLogging(true);
**
none
Expected behavior
Is this not how you should use FieldValue.serverTimestamp() from ‘@firebase/firestore-types’ - or maybe I am misunderstood something?
The server datetime being saved
Actual behavior
I get this error: Can’t find module: @firebase/firestore-types/index (@0.2.2)
Check your import statements & ensure you’re importing the correct module names.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (7 by maintainers)
The
-types
packages are just types and will not work as runtime values. Use the@firebase/app
module instead.@dauledk You don’t need to install the
@firebase/*
ones since they are declared as dependencies offirebase
already.See https://unpkg.com/firebase@4.12.0/package.json