Error: Missing required flag: -a, --app APP app to run command against

强颜欢笑 提交于 2020-08-10 05:48:27

问题


I am new to Heroku and I keep getting the above error - everything looks good to go when I deploy in heroku, connect to my github repo etc.. but I keep getting this error.

Its a node/express app and works exactly as I'd like locally but it won't deploy. Any help would be appreciated.


回答1:


For getting logs of particular heroku app, use: heroku logs --app=app_name For example: your app name is 'chatapp'

heroku logs -app=chatapp




回答2:


just run the command with the --app flag, followed by the app name.




回答3:


To expand a little further on this (just for the benefit of other new users encountering a similar issue) - below is an example of a command you could enter in macOS Terminal:

heroku logs --tail --app yourexampleservername

If you have deployed yourexampleservername to Heroku, this should then display a log.




回答4:


I like how the --app flag is "mandatory" according to the official documentation, but the lone usage example in the official documentation doesn't use the --app flag.

Anyway, it's not really mandatory. It's just implicit, usually. You have to tell Heroku which app you're using, with something like heroku git:remote -a your_app_name, and then it stops wondering which app to run these commands on.



来源:https://stackoverflow.com/questions/54779162/error-missing-required-flag-a-app-app-app-to-run-command-against

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!