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
Text Encoding Between Linux and Windows
Setting an Acpi Field in Linux
Does Routing Affect a Socket with a Bound Source Address
Cmake: How to Suppress "Entering Directory" Messages
Git Clone Repository in a Specific Folder But Keep Default Folder Name
A Wrong Size of "Len" Calculated by $ - Symbol with Fasm Equ
Which Tool Has Replaced Gatttool in Bluez5
Can't Load Mod_Wsgi Compiled for Python 3
Shell: What Is The Purpose of ${Var:-} When Var Is Unset or Null
Building Subversion 1.5.4 on Debian: Could Not Find Library Containing Rsa_New
How to Find Grid Points Nearest to Given Location Using Shell Script
Ssh Environment Variable for Sudo Access
How to Enter Private Key Password with Ansible
How to Remove Space/Tab from Command Output
What Is Difference Between Sched_Batch and Sched_Other Scheduling