The Cloud Functions emulator requires the module "firebase-admin" to be version >7.0.0 so your version is too old. You can probably fix this by running "npm install firebase-admin@latest" in your functions directory.
We are currently using these versions:
"firebase-admin": "~6.0.0"
"firebase-functions": "^2.0.3"
"firebase-functions-test": "^0.1.3"
"firebase-tools": "^6.8.0"
"node": "8"
We have tried deleting and reinstalling all node modules and we have also deleted any global installations of Firebase-related node modules
Needless to say, we have also tried running npm install firebase-admin@latest
in our functions' directory.
The error seemingly started appearing out of the blue. That is, we have not made any changes to our package.json file between when the functions were working and when they started to give us this error.
The answer to The Cloud Functions emulator requires the module "firebase-admin" to be installed suggests downgrading firebase-tools
to version 6.8.0
, which appears to be our current version.