Search code examples
firebasegoogle-cloud-functionsfirebase-admin

The Cloud Functions emulator requires the module "firebase-admin" to be installed


Continuing to try to get firebase serve to work again. I just asked this question (and got a good reply, thanks): npm ERR! peer dep missing: firebase-admin@^7.0.0, required by firebase-functions@2.3.1

When doing npm list firebase-admin I now see the expected output -- firebase-admin@7.3.0.

However firebase serve still does not work. I get this:

!  Your requested "node" version "6" doesn't match your global version "10"
...
!  The Cloud Functions emulator requires the module "firebase-admin" to be installed. This package is in your package.json, but it's not available. You probably need to run "npm install" in your functions directory.
i  functions: Your functions could not be parsed due to an issue with your node_modules (see above)

So firebase serve still does not see the firebase-admin module. What is going on? What should I do?


Solution

  • I was seeing the same thing and it looks like you can downgrade your firebase-tools version to 6.8.0

    npm install firebase-tools@6.8.0 -g

    (I've tried this and it works)