Firebase CLI 如何更改项目范围?firebase init(错误:403,调用者没有权限)使用另一个帐户的项目网址

Man*_*tha 5 node.js firebase firebase-cli

使用 firebase init --debug 时的错误

[2019-01-28T05:32:18.956Z] Error Context: {
  "body": {
"error": {
  "code": 403,
  "message": "The caller does not have permission",
  "status": "PERMISSION_DENIED"
}
},
"response": {
"statusCode": 403,
"body": {
  "error": {
    "code": 403,
    "message": "The caller does not have permission",
    "status": "PERMISSION_DENIED"
  }
},
"headers": {
  "vary": "X-Origin, Referer, Origin,Accept-Encoding",
  "content-type": "application/json; charset=UTF-8",
  "date": "Mon, 28 Jan 2019 05:32:18 GMT",
  "server": "ESF",
  "cache-control": "private",
  "x-xss-protection": "1; mode=block",
  "x-frame-options": "SAMEORIGIN",
  "x-content-type-options": "nosniff",
  "alt-svc": "quic=\":443\"; ma=2592000; v=\"44,43,39\"",
  "accept-ranges": "none",
  "transfer-encoding": "chunked"
},
"request": {
  "uri": {
    "protocol": "https:",
    "slashes": true,
    "auth": null,
    "host": "firebase.googleapis.com",
    "port": 443,
    "hostname": "firebase.googleapis.com",
    "hash": null,
    "search": null,
    "query": null,
    "pathname": "/v1beta1/projects/young-picasso",
    "path": "/v1beta1/projects/young-picasso",
    "href": "https://firebase.googleapis.com/v1beta1/projects/young-picasso"
  },
  "method": "GET"
  }
}
}
Run Code Online (Sandbox Code Playgroud)

如何将项目路径更改为我当前使用的路径?我目前正在不同帐户中处理项目,但显示的路径是以前帐户的项目。目前它显示年轻的毕加索,但我的项目路径在另一个帐户中不同。我是 firebase cli 的新手,我不知道如何解决这个问题,我该如何解决?

此外,firebase list 命令显示我的项目,我目前作为当前工作并且权限类型为所有者。我也已经使用命令 firebase -login --reauth 从以前的帐户更改为另一个帐户。

Tic*_*haz 5

我通过删除这个文件解决了这个问题.firebaserc

脚步:

  1. .firebaserc在您的应用程序文件夹中查找文件。
  2. 删除它。
  3. 在 CMD 再试一次。 firebase init

祝你好运


Man*_*tha 0

在 npm 上重新安装 firebase-tools 成功了!但是,如果有人知道如何在不重新安装 npm firebase-tools 的情况下修复项目范围,请告诉我。