Firebase Functions Deploy: Error occurred while parsing your function triggers
14,711
It's a bug in [email protected]
. Fixed in 3.18.2
.
Run: npm install -g firebase-tools@latest
Author by
Dimitri
Focusing on Ionic and cross-platform mobile app development, Deep Learning and Neural Networks. I'm also obsessed with UX and great product design.
Updated on June 09, 2022Comments
-
Dimitri about 2 years
I'm using Firebase Functions
JavaScript
version, and when I runfirebase deploy
, I'm getting this error:Error: Error occurred while parsing your function triggers.
Error: Failed to parse app options file: Error: ENOENT: no such file or directory, open '[object Object]' at FirebaseAppError.FirebaseError
This is my
index.js
code up until the line which causes this error:var functions = require('firebase-functions'); var firebase = require('firebase'); var admin = require('firebase-admin'); var serviceAccount = require("../functions/file.json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://app.firebaseio.com" }); var config = { apiKey: "key", authDomain: "app.firebaseapp.com", databaseURL: "https://app.firebaseio.com", projectId: "appID", storageBucket: "app.appspot.com", messagingSenderId: "number" }; firebase.initializeApp(config); admin.initializeApp(functions.config().firebase);
My Node version - 8.11.1
NPM - 5.6.0
-
Doug Stevenson about 6 years3.18.2 fixes this. github.com/firebase/firebase-tools/releases/tag/v3.18.2
-
loekTheDreamer over 5 yearsagain with this issue "firebase-admin": "~6.0.0", "firebase-functions": "^2.1.0",
-
AinisSK over 5 years@LukeCarelsen did you fix your issue somehow?
-
loekTheDreamer over 5 years@AinisSK i cant remember... i dont think so try 3.18.2 like suggested above. sorry :P
-
sziraqui over 4 yearsAdd explanation to why this will solve the problem.
-
NCT 127 over 3 yearsFor me, it was that I had forgotten to change a function from firestore to database.
-
aTo over 3 years@sziraqui It's a bug inside old version so update to the latest should fix this problem