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

前端 未结 3 1237
伪装坚强ぢ
伪装坚强ぢ 2020-12-11 15:53

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

相关标签:
3条回答
  • 2020-12-11 16:19

    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)

    0 讨论(0)
  • 2020-12-11 16:26

    Basically it means that you should downgrade to either Node 6 or 8 not upgrade to 10 (As the node version in your system is 10 while Firebase is requesting version 6). Firebase does not yet support Node 10+ or even the latest version which is 12.15.0

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题