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

心已入冬 提交于 2019-11-28 01:52:20

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)

It looks like this issue now relates to the Node version you have installed locally.

I don't know the answer off the top of my head, but start looking around the node versions.

In your functions/package.json - it may be that you need to specify which node version to use (https://firebase.google.com/docs/functions/manage-functions):

// functions/package.json

{
  "name": ...,
  "scripts": ...,
  "dependencies": ...,
  
  "engines": {
    "node": "10"
  }
 
}

Just be aware Node 10 is still in beta on Firebase.

Hope this helps you down the right path to resolving the issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!