· InfoVision BV

Error deploying cloud function (firebase access)

Hello,

I still get an error when implementing the following method. I think this line is causing problems: "const app = admin.initializeApp(firebaseConfig);"

can anyone help me further? 

Thanks!


const functions = require('firebase-functions');
const admin = require('firebase-admin');

const firebaseConfig = {
  apiKey: ...,
  authDomain: ...,
  projectId: ...,
  storageBucket: ...,
  messagingSenderId: ...,
  appId: ...,
  measurementId: ...
};
const app = admin.initializeApp(firebaseConfig);

exports.calculateTotalStars = functions.region('europe-west3').https.onCall(
  (data, context) => {
    // Write your code below!
    
    // Write your code above!
	return 0;
  }
);
1
2 replies