Search code examples
herokuheroku-cli

Heroku CLI - How to solve the Error: Missing required flag: -a --app APP?


I manage to deploy a Scala Play 2.7 App that uses Postgres but it doesn't run with error:

(base) bravegag@Zeus:~/code/myapp$ heroku open
 ›   Error: Missing required flag:
 ›     -a, --app APP  app to run command against
 ›   See more help with --help
(base) bravegag@Zeus:~/code/myapp$ heroku logs --tail
 ›   Error: Missing required flag:
 ›     -a, --app APP  app to run command against
 ›   See more help with --help

How do I fix that?


Solution

  • that's a heroku cli flag, not scala/play. just specify the name of your heroku app when using the heroku cli:

    $ heroku open --app <app-name>
    

    (same for other commands)

    you can find the name of your app in heroku dashboard (somewhere in https://heroku.com)

    If you enter your app in heroku you will reach a link like https://dashboard.heroku.com/apps/<app-name>