无法将项目部署到 firebase

Can't deploy project to firebase

我尝试将我的应用程序部署到 firebase,但失败了。

$ firebase deploy --project af2test

⚠ Your CLI authentication needs to be updated to take advantage of new features. ⚠ Please run firebase login --reauth

Error: Unable to authorize access to project af2test

Note: This version of the Firebase CLI is only compatible with projects upgraded to the new Firebase Console. To access firebase.com apps, you will need to use a previous version: npm install -g firebase-tools@^2.1

To access the Firebase Console, visit https://console.firebase.google.com/

Having trouble? Try firebase deploy --help

看起来 firebase-tools 认为我有旧版本的 firebase 应用程序。但是,我只是在新控制台中创建新项目,但它仍然无法正常工作。它昨天曾经工作过。我使用来自 npm

的最新 firebase-tools

$ firebase -V

3.6.0

如果我降级到 2.1。它会要求我升级吗?有什么解决办法吗?

$ firebase deploy --project af2test

Error: CLI is out of date (on 2.2.1 , need at least 3.0.0)

Run npm install -g firebase-tools to upgrade.

MichaelBleigh 有答案

运行

firebase list

显示如下内容:

┌─────────┬───────────────────────┬─────────────┐
│ Name    │ Project ID / Instance │ Permissions │
├─────────┼───────────────────────┼─────────────┤
│ af2test │ af2test-f289d         │ Owner       │
└─────────┴───────────────────────┴─────────────┘

使用项目 ID 进行部署

firebase deploy --project af2test-f289d