firebase.auth/storage/database is not a function but firebase.storage is

265 views Asked by At

I'm learning node.js with firebase/firestore. For some reason only firebase.firestore() is being recognized as a function. firebase.auth(), firebase.storage() and firebase.database() are not being recognized as functions.

I'm using the basic code from one of the youtube examples:

var config = {
    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: ""
  };
  firebase.initializeApp(config);
  var firestore = firebase.firestore();

also this question appears to be in the same territory but was not helpful for me. Firebase Initializing Without Auth - firebase.auth is not a function

1

There are 1 answers

1
Léo R. On

Are you sure you included all firebase plugin ? from the doc :

You can reduce the amount of code your app uses by just including the features you need. The individually installable components are:

  • firebase-app - The core firebase client (required).
  • firebase-auth - Firebase Authentication (optional).
  • firebase-database - The Firebase Realtime Database (optional).
  • firebase-storage - Firebase Storage (optional).