Cannot Find Module 'Firebase-Admin' When Trying to Deploy Firebase Functions

Firebase function deploy error cannot find module firebase-admin

Your code is fine it is a firebase cloud functions issue.

I already solved in:

issue

fwd:
Same issue here. It is a firebase problem.

There is disruption in firebase cloud service since yesterday.

see this image

problem description: https://status.firebase.google.com/incident/Functions/17024

problem solution:

Run the following commands inside the functions repository:

npm install --save-exact firebase-functions@0.7.0 npm install --save-exact firebase-admin@5.4.0

Then try deploying functions again:

firebase deploy --only functions

I hope this helps :)

Firebase deploy error - Cannot find module 'firebase'

Figured out the solution. I hadn't installed the firebase module in the functions folder but had included it in the parent folder of functions. I went into functions and ran npm install --save firebase and the deploy was successful.

FIrebase deploy error: Cannot find module 'firebase-admin'

They have an active service disruption. Follow this for a workaround: https://status.firebase.google.com/incident/Functions/17024

Run the following commands inside the functions repository:

npm install --save-exact firebase-functions@0.7.0 npm install --save-exact firebase-admin@5.4.0

Then try deploying functions again:

firebase deploy --only functions

If npm doesn't work, you can try yarn which worked for us:

yarn add firebase-functions@0.7.0 --exact yarn add firebase-admin@5.4.0 --exact

Error: Cannot find module 'firebase/app' When deploying google cloud function

You're not supposed to use the Firebase client SDKs for backend code. What you're trying to do can be achieved using only the Google Cloud Firestore SDK (@google-cloud/firestore) or the Firebase Admin SDK (firebase-admin, which just writes the Cloud SDK). Just remove the Firebase client SDKs (beginning with @firebase) and use only the backend SDKs you prefer.

Error parsing triggers: Cannot find module 'firebase-admin/lib/database'

The reason was, one of the 'required' files inside 'functions' directory was updated during upgrade. This line was added:

const { admin } = require('firebase-admin/lib/database');

Commented this line and deploy is working fine for me now.



Related Topics



Leave a reply



Submit