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!
Initialise with git: git init
Get the app name: heroku apps
Add remote:
heroku git:remote -a your_app_name
Edit: You can also run commands without permanently adding the app
heroku run -a your_app_name
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
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
whenever you run some commands for effecting your heroku application, you need to set git remote to your application to work, use that by,
heroku git:remote -a your_app_name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With