在Firebase Hosting中部署React项目



我用React.js写了一个项目,我想在Firebase托管中部署它,但我得到以下错误:

错误:未能列出Firebase项目。查看firebase-debug.log获取更多信息。

firebase-debug.log:

[debug] [2022-06-03T14:11:04.642Z] ----------------------------------------------------------------------
[debug] [2022-06-03T14:11:04.646Z] Command:       /usr/local/bin/node /usr/local/bin/firebase init
[debug] [2022-06-03T14:11:04.647Z] CLI Version:   11.0.1
[debug] [2022-06-03T14:11:04.648Z] Platform:      linux
[debug] [2022-06-03T14:11:04.648Z] Node Version:  v16.14.0
[debug] [2022-06-03T14:11:04.649Z] Time:          Fri Jun 03 2022 10:11:04 GMT-0400 (Eastern Daylight Time)
[debug] [2022-06-03T14:11:04.649Z] ----------------------------------------------------------------------
[debug] 
[debug] [2022-06-03T14:11:04.656Z] >>> [apiv2][query] GET https://firebase-public.firebaseio.com/cli.json [none]
[debug] [2022-06-03T14:11:04.697Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2022-06-03T14:11:04.698Z] > authorizing via signed-in user (abc.sadeghi27@gmail.com)
[info] 
######## #### ########  ######## ########     ###     ######  ########
##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
######    ##  ########  ######   ########  #########  ######  ######
##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
##       #### ##     ## ######## ########  ##     ##  ######  ########
You're about to initialize a Firebase project in this directory:
/home/ali27/Desktop/Project/Resume/react-site
[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] 
[debug] [2022-06-03T14:11:10.062Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=100
[debug] [2022-06-03T14:11:11.166Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects 403
[debug] [2022-06-03T14:11:11.167Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects [omitted]
[debug] [2022-06-03T14:11:11.167Z] Unable to parse JSON: SyntaxError: Unexpected token < in JSON at position 0
[debug] [2022-06-03T14:11:11.719Z] FirebaseError: Unable to parse JSON: SyntaxError: Unexpected token < in JSON at position 0
at RetryOperation._fn (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:258:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[error] 
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.

谢谢你解决了我的问题。

您的会话可能已过期。尝试重新验证,使用以下命令;

firebase login:add

相关内容

  • 没有找到相关文章

最新更新