如何在Firebase中托管扑动应用程序?



关于如何托管一个flutter web应用程序的最新指令是什么?我在Windows上遵循https://developer.school/tutorials/hosting-a-flutter-web-project-on-firebase-hosting,这里的步骤firebase init对我来说失败了。

firebase-debug.log的内容如下:

You're about to initialize a Firebase project in this directory:
C:Coding Repository230102 flutter hello worldflutter_hello_world
Before we get started, keep in mind:
* You are currently outside your home directory
[info] 
=== Project Setup
[info] 
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add, 
[info] but for now we'll just set up a default project.
[info] 
[info] i  If you want to create a project in a Google Cloud organization or folder, please use "firebase projects:create" instead, and return to this command when you've created the project. 
[debug] [2023-01-03T04:11:48.673Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects [none]
[debug] [2023-01-03T04:11:48.674Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"projectId":"flutter_hello_world_deployment_by_mish","name":"flutter_hello_world"}
[debug] [2023-01-03T04:11:48.832Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects 400
[debug] [2023-01-03T04:11:48.832Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"project_id","description":"project_id must be at most 30 characters long"},{"field":"project_id","description":"project_id contains invalid characters"},{"field":"display_name","description":"project display name contains invalid characters"}]},{"@type":"type.googleapis.com/google.rpc.Help","links":[{"url":"https://cloud.google.com/resource-manager/reference/rest/v1/projects"}]}]}}
[debug] [2023-01-03T04:11:48.881Z] FirebaseError: HTTP Error: 400, Request contains an invalid argument.
at responseToError (C:UsersmishcAppDataRoamingnpmnode_modulesfirebase-toolslibresponseToError.js:49:12)
at RetryOperation._fn (C:UsersmishcAppDataRoamingnpmnode_modulesfirebase-toolslibapiv2.js:288:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error] 
[error] Error: Failed to create project. See firebase-debug.log for more info.

错误提示:

project_id长度不超过30个字符

听起来你输入的项目ID比这个长。

相关内容

  • 没有找到相关文章

最新更新