“功能启动”启动错误的功能

时间:2019-08-23 03:57:15

标签: firebase google-cloud-functions

在我的functions目录中运行firebase serve时,我的函数可以正常运行。但是,当我运行functions start时,它会运行我很久以前使用的其他功能。它如何决定从什么开始?它不应该启动我所在目录的功能吗?

我还运行以下内容:

  

功能配置集projectId [my-project-on-firebase]

  

firebase使用[my-project-on-firebase]

但仍然得到相同的结果

f

1 个答案:

答案 0 :(得分:1)

firebase命令是Firebase CLI的一部分,Firebase CLI由Firebase提供,用于模拟将通过CLI部署的功能。它与使用functions命令运行的Google Cloud Functions Emulator不同。他们通常彼此之间没有任何关系。如果要通过Firebase CLI进行部署,请使用Firebase工具;如果要通过gcloud进行部署,请使用Cloud工具。您不会将它们相互串联使用,并且它们具有不同的配置。因此,当您运行每个命令时,将获得不同的配置。您必须返回并弄清楚如何将Cloud工具配置为与Firebase工具不同。