云功能仿真器需要模块"firebase-admin"来执行.要安装 [英] The Cloud Functions emulator requires the module "firebase-admin" to be installed
问题描述
继续尝试使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屋!