Cloud Functions emulator需要模块";firebase管理员“;待安装
继续尝试使Cloud Functions emulator需要模块";firebase管理员“;待安装,firebase,google-cloud-functions,firebase-admin,Firebase,Google Cloud Functions,Firebase Admin,继续尝试使firebase发球再次工作。我刚刚问了这个问题(得到了很好的回答,谢谢): 执行npm list firebase admin时,我现在看到了预期的输出--firebase-admin@7.3.0 但是firebase发球仍然不起作用。我明白了: ! Your requested "node" version "6" doesn't match your global version "10" ... ! The Cloud Functions emulator require
firebase发球
再次工作。我刚刚问了这个问题(得到了很好的回答,谢谢):
执行npm list firebase admin
时,我现在看到了预期的输出--firebase-admin@7.3.0
但是firebase发球
仍然不起作用。我明白了:
! 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-service
仍然看不到firebase-admin
模块。发生了什么事?我该怎么办?看起来这个问题现在与您在本地安装的节点版本有关
我不知道答案,但开始看看节点版本
在functions/package.json中-可能需要指定要使用的节点版本():
//函数/package.json
{
“姓名”:。。。,
“脚本”:。。。,
“依赖项”:。。。,
“发动机”:{
“节点”:“10”
}
}
我也看到了同样的事情,看起来你可以
npm安装firebase-tools@6.8.0-g
(我已经试过了,效果不错)基本上,这意味着您应该降级到节点6或节点8,而不是
升级至10(因为Firebase请求版本6时,系统中的节点版本为10)。Firebase还不支持Node 10+,甚至不支持最新版本12.15.0设置
“Node”:“8”
也可能是一个选项。谢谢。我已经安装了nvm
,现在正在使用版本8。我已更改为“节点”:“8”
。我已经删除了package lock.json
和node\u模块
,并运行了npm安装
。我还是会犯同样的错误,看到同样的东西。还尝试了节点8和节点10,但没有成功谢谢,这很有效。它也解决了我在这里报告的问题:这对我来说不起作用。仿真器点击部署到firebase的函数,而不是从localhost为其提供服务。现在firebase admin支持node 10及以上版本。他们在npm库页面上提到了这一点。