Heroku missing required flag: -a,

蓝咒 提交于 2020-01-31 06:57:05

问题


I am currently doing a project and I am having issues with heroku.

Here is the mistake that always pops up when I try to use a heroku command.

Error in question

For those of you who have had the same error, what is the possible cause for this?

Thanks in advance!


回答1:


  • Initialise with git: git init

  • Get the app name: heroku apps

  • Add remote:

heroku git:remote -a your_app_name



回答2:


When you create a Heroku app with

heroku create my-app

you need to provide the flag (-a, --app) to the add-on installation

heroku addons:create heroku-postgresql:hobby-dev --app my-app



回答3:


The error is for missing app name. You must provide your app name that you want to run. Your command should be like below:

heroku run -a YOUR_APP_NAME_HERE

or

heroku run --app YOUR_APP_NAME_HERE




回答4:


I had the same problem and all it required was getting into the app directory, in the app.js level



来源:https://stackoverflow.com/questions/51815542/heroku-missing-required-flag-a

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