Firebase Project Initialization Error: Cloud resource location is not set for this project

天涯浪子 提交于 2021-02-07 05:12:41

问题


I tried to find a quick answer to this question but couldn't find anything. I am trying to set up an Ionic application to use an existing Firebase project and when running firebase init in the windows console I get this message:

Error: Cloud resource location is not set for this project but the operation you are attempting to perform in Cloud Firestore requires it. Please see this documentation for more details: https://firebase.google.com/docs/projects/locations


回答1:


The message is actually clear but it took me a while to find where in the Firebase console the necessary option is located:

  • Go to your project Settings
  • On the first tab, locate the settings that reads "Set up Cloud Storage in FB console"
  • If it is not set, edit it and set the value

Strangely, this value is mandatory earlier when creating your project but for some reason you need to explicitly select it again in this form.




回答2:


Here is what you have to do:

  1. Go to the firebase console and open your project

  2. Go to Storage tab ( on left )

  3. Click setup storage

  4. Run firebase init again




回答3:


To their credit the command line error links out to the right page of the docs, but it's at the bottom of the page and so if hitting this error might just need to go to the project settings in the firebase console and select a region I usually go with us-central1



来源:https://stackoverflow.com/questions/58579042/firebase-project-initialization-error-cloud-resource-location-is-not-set-for-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!