title: firebase.getDatabase()).ref() is not a function
body: <p>Hello I'm doing a project shcool on <code>nodeJS</code> and work with firebase.
  I try to get the <code>name</code> of a <code>users</code> to not rewrite an existing value.
  the db is:</p>
  <p><a href="https://i.stack.imgur.com/o6Sq4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o6Sq4.png" alt="the db" /></a></p>
  <p>my code to try something:</p>
  <p>serv.js</p>
  <pre><code>const firebaseConfig = {
    apiKey: process.env.REACT_APP_API_KEY,
    authDomain: process.env.REACT_APP_AUTHDOMAIN,
    databaseURL: process.env.REACT_APP_DATABASEURL,
    projectId: process.env.REACT_APP_PROJECTID,
    storageBucket: process.env.REACT_APP_STORAGEBUCKET,
    messagingSenderId: process.env.REACT_APP_MESSASGINGSENDERID,
    appId: process.env.REACT_APP_APPID,
    measurementId: process.env.REACT_APP_MEASUREMENTID
  };
  
  const {initializeApp} = require('firebase/app');
  const {getDatabase} = require('firebase/database');
  const {getAuth, signInWithEmailAndPassword, createUserWithEmailAndPassword} = require('firebase/auth');
  
  const fireapp = initializeApp(firebaseConfig);
  const db = getDatabase(fireapp);
  var firebaseauth = getAuth(fireapp);
  [...]
  
  function create_entry_name(name, email)
  {
    const ref = db.ref('/users/' + name);
  
    ref.on('value', (snapshot) =&gt; {
      console.log(snapshot.val());
    }, (errorObject) =&gt; {
      console.log('The read failed: ' + errorObject.name);
    });
  }
  </code></pre>
  <p>that's litteraly the example on the firebase website.</p>
  <p>But I get an error witch is:</p>
  <pre><code>db.ref is not a function
  </code></pre>
  <p>I will really be thanks full if you have an solution for this problem...</p>