rasen58 rasen58 - 1 year ago 196
Node.js Question

Firebase npm authentication error

I haven't touched my project in 2 weeks, but now when I tried running

npm start
, the server won't start, and I get

throw new Error('Failed to parse service account key file: ' + error);

Error: Failed to parse service account key file: Error: ENOENT: no such file or directory, open 'C:\Users\Me\Git\eebooks\eebooks-065dd2a531ca-credentials.json'

I'm using the firebase npm module in a node web app.
Is there some new authentication procedure I should be following?

Answer Source

I got it to work. It seems the initializeApp function was updated and requires more parameters now.

var config = {
        apiKey: "--",
        authDomain: "--.com",
        databaseURL: "https://--.com",
        storageBucket: "project----.appspot.com",
var firebaseApp = Firebase.initializeApp(config);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download