1
votes

I tried running firebase serve on my local machine and gets below warning

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.

What I've tried from previous SO and github

  • npm install from folder functions
  • delete node_modules and re-run npm install
  • run npm install --save firebase-admin

SO and github references but non solved my problem

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

Im having trouble while serving or deploying Firebase Hosting Functions

https://github.com/firebase/firebase-tools/issues/1452

PS: Downgrade to version 6 is not an option.

I'm running node 8 and "firebase-admin": "^8.6.0" as shown from package.json

1
What is your exact version of Node.js? Make sure it is at least 8.13.0. The minor version number is important. - Hiranya Jayathilaka

1 Answers

1
votes

With the help of Hiranya Jayathilaka comment above I was able to fix this. I upgraded my node from 8.5.x to 8.16.2 and run npm install firebase-tools and everything works fine.