2

I installed only "firebase-auth" "firebase-app" modules inside AWS lambda because the .zip file has to be smaller then 10mb.

And this is my code inside AWS lambda.

var firebase = require('firebase');
exports.handler = (event, context, callback) => {

  context.callbackWaitsForEmptyEventLoop = false;

  var config = {
    apiKey: "lnlnnl",
    authDomain: "lfirjlkje.baseapp.com",
    databaseURL: "https://kjhjkh.firebaseio.com",
    projectId: "jhkhjh-88eaf",
    storageBucket: "hj.hjappspot.com",
    messagingSenderId: "977997"
  };

  if(firebase.apps.length == 0) {
     firebase.initializeApp(config);
  } 
    };

I have firebase.apps undefined and firebase.initializeApp undefined.

any ideas what is wrong ?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
AlexZvl
  • 2,092
  • 4
  • 18
  • 32

0 Answers0