0

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.

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467

1 Answers1

0

The fix for us was to remove the ^ from the firebase-tools version.

"firebase-tools": "^6.8.0" // before
"firebase-tools": "6.8.0"  // after

The minor version upgrade from 6.8.0 to 6.10.0 introduced the breaking change.

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467