question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3 missing firebase.database.ServerValue.TIMESTAMP?

See original GitHub issue

In v2 you could do

import firebase from 'firebase'
firebase.database.ServerValue.TIMESTAMP

but in v3 ServerValue is not defined. What is the right import path? https://firebase.google.com/docs/reference/js/firebase.database.ServerValue.html

I tried accessing database.ServerValue from:

  • import firebase from 'firebase'
  • import firebase from 'firebase/app'
  • firebase: service()
  • firebaseApp: service()

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
CICCIOSGAMINOcommented, Sep 21, 2021

Probably can be close with the Firebase Js V9 API !

  import { serverTimestamp } from 'firebase/database'
0reactions
jamesdanielscommented, Oct 14, 2019

I’m planning on adding new data types to the adapter that will do stuff like this for you, I’ll leave open for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can not access to firebase.database.ServerValue ...
Try this syntax: import Firebase from 'firebase'. and then: Firebase.database.ServerValue.TIMESTAMP.
Read more >
ServerValue | Firebase JavaScript API reference
Reference for ServerValue.
Read more >
The secrets of Firestore's FieldValue.serverTimestamp()
Everything you need to know about Firestore server timestamps, ... to say what you want to do with these missing timestamps.
Read more >
Firebase Realtime Database onDisconnect - Google Groups
uid+'/lastOnline');. lastOnlineRef.onDisconnect().set(firebase.database.ServerValue.TIMESTAMP);. Trying to keep it really crazy simple there ...
Read more >
What's the exact form of ServerValue.TIMESTAMP? : r/Firebase
I'm wondering whether I am horrible at looking through the Firebase documentation or it's actually just missing some information. Specifically I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found