title: How to use firebase.firestore.FieldValue.serverTimestamp() now?
body: <p>I am following a tutorial and firebase.firestore.FieldValue.serverTimestamp() is used in the code to set <code>timestamp</code> prop as the server timestamp.</p>
  <pre><code>import firebase from &quot;firebase&quot;;
  </code></pre>
  <pre><code>const someFunction = () =&gt; {
      addDoc(collection(db, `rooms/${roomId}/messages`), {
        message: input,
        name: user.displayName,
        timestamp: firebase.firestore.FieldValue.serverTimestamp(),
      }).then((res) =&gt; getMessagesData());
    };
  </code></pre>
  <p>But I get this error.</p>
  <pre><code>Module not found: Can't resolve 'firebase' in ...
  </code></pre>
  <p>I suppose firebase had some kind of update that we don't import it with <code>import firebase from &quot;firebase&quot;;</code> anymore? What should I do to use the <code>servertimestamp()</code>?</p>