云功能仿真器需要模块"firebase-admin"来执行.要安装 [英] The Cloud Functions emulator requires the module "firebase-admin" to be installed

查看:48
本文介绍了云功能仿真器需要模块"firebase-admin"来执行.要安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

继续尝试使firebase serve重新工作.我只是问了这个问题(得到了很好的答复,谢谢): npm ERR!缺少对等部门:firebase-functions@2.3.1所需的firebase-admin@^7.0.0

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

执行npm list firebase-admin时,我现在看到预期的输出-- firebase-admin@7.3.0.

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

但是firebase serve仍然不起作用.我明白了:

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)

因此,firebase serve仍然看不到firebase-admin模块.到底是怎么回事?我该怎么办?

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

推荐答案

我看到的是同一件事,看来您可以

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)

这篇关于云功能仿真器需要模块"firebase-admin"来执行.要安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆