“找不到该应用。” 在控制台中运行heroku命令时

Pat*_*boy 3 heroku heroku-api heroku-cli

I'm trying to run commands for my heroku app in my console, but it keeps telling me "Couldn't find that app." even though when I run heroku apps in my console it tells me I have one app called worldofwarcraft-api

So heroku recognizes my app in the apps list, but I can't run any commands to access it. The line I want to run is

heroku ps:scale web=1 --app worldofwarcraft-api
Run Code Online (Sandbox Code Playgroud)

I'm trying to troubleshoot why my API returns a 503 when I try to make a GET request to it. This is the fix the heroku faq told me to try, but it's just telling me it can't find my app.

I'm wondering if it has something to do with the fact that I deployed my API from github, rather than running the heroku setup in my console. I don't know if that would effect my ability to run heroku commands on the app in my local console.

Apologies if my formatting is off a bit. I'm still getting used to this site.

Yeg*_*mba 28

就我而言,有人重命名了 GitHub 存储库,我试图找到具有新 GitHub 名称的 Heroku 应用程序

它帮助到我

heroku apps
heroku git:remote -a YOUR_APP
Run Code Online (Sandbox Code Playgroud)


Eli*_*ado 15

只需一个简单的方法即可解决此问题:

第一:将命令添加到终端中:$ heroku apps

如果您已经从终端登录了 heroku 帐户,您的所有应用程序将显示为如下列表:

your-project-name-1
your-project-name-2  
your-project-name-3
your-project-name-4
Run Code Online (Sandbox Code Playgroud)

第二:然后使用以下命令选择您需要连接的一个:

$ heroku git:remote -a your-project-name-2

如果连接正确,您将收到以下输出:

set git remote heroku to https://git.heroku.com/your-project-name-2.git


Pat*_*boy 5

Solved it. Just sharing for future searches.

The issue was fixed by running git init and then heroku git:remote -a worldofwarcraft-api in my command line while inside my repositories folder. This initialized git in the repo and then set the heroku git remote to that repository.

Hopefully, this helps anyone else who had a similar issue.