I noticed that Firebase has recently changed. I am creating a node.js application that requires firebase, and previously this was enough:
var Firebase = require("firebase"); var firebaseRef = new Firebase("https://blabla.firebaseio.com/");
This link: https://firebase.google.com/docs/web/setup#prerequisites
you need to create a firebase project in the new firebase console and then add firebase to your web application. This gives you something similar to:
However, when starting my node.js application, I get the following error message:
throw new Error('Invalid service account provided'); ^ Error: Invalid service account provided at new Auth (C:\Projects\lambdaTestFunction\node_modules\firebase\auth-node\auth.js:61:11) at Object.serviceFactory [as auth] (C:\Projects\lambdaTestFunction\node_modules\firebase\auth-node\index.js:14:14) at Fu (C:\Projects\lambdaTestFunction\node_modules\firebase\app-node.js:14:94) at C:\Projects\lambdaTestFunction\node_modules\firebase\auth-node\index.js:31:9 at C:\Projects\lambdaTestFunction\node_modules\firebase\app-node.js:11:272 at Array.forEach (native) at Object.e.initializeApp (C:\Projects\lambdaTestFunction\node_modules\firebase\app-node.js:11:245) at Object.<anonymous> (C:\Projects\lambdaTestFunction\index.js:44:10) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)
What exactly am I missing?
Thanks in advance.
javascript firebase
Victor Oliveira Antonino
source share