gpt4 book ai didi

firebase - Cloud Functions 模拟器需要安装模块 "firebase-admin"

转载 作者:行者123 更新时间:2023-12-04 03:41:53 25 4
gpt4 key购买 nike

继续尝试获取firebase serve再次工作。我刚刚问了这个问题(得到了很好的答复,谢谢):
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 .

然而firebase serve还是不行。我明白了:

!  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模块。到底是怎么回事?我该怎么办?

最佳答案

我看到了同样的事情,看起来你可以 downgrade your firebase-tools version to 6.8.0
npm install firebase-tools@6.8.0 -g
(我试过这个并且它有效)

关于firebase - Cloud Functions 模拟器需要安装模块 "firebase-admin",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56068579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com