问题
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 initGet the app name:
heroku appsAdd 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