Im trying to deploy a very simple bot to heroku but I cant set the worker dyno because it doesnt show up on the dashboard, even though I have a Procfile with just one line it: worker: node app.js
-
Was your build successful? Do you see your app's code when you run `heroku run bash`? – Damien MATHIEU Feb 05 '19 at 13:14
-
@DamienMATHIEU When I run heroku run bash it executes without errors, it doesnt print anything it just gives me the bash prompt to type. On 'ls' I see every file/folder except the Procfile, should it be invisible or is this the problem? – Officer Vimes Feb 05 '19 at 14:28
-
If the Procfile isn't there, it means you haven't committed. It may be in gitignore, or you didn't commit the change. – Damien MATHIEU Feb 05 '19 at 14:53
-
@DamienMATHIEU I did `git add .` - `git commit -m "Heroku stuff"` - `git push heroku master` and it just tells me everything is up to date. It does this everytime actually, so you might be right, but not because I forgot, rather because for some reason its not detecting any changes whatsoever – Officer Vimes Feb 05 '19 at 16:45
4 Answers
Same issue, I resolved it from Heroku documentation:
Scaling a process type
Heroku runs one web
dyno for you automatically, but other process types don’t start by default. To launch a worker, you need to scale it up to one dyno:
heroku ps:scale worker=1
Scaling worker processes... done, now running 1

- 705
- 1
- 14
- 26
I had the same issue, correct code but worker didn't appear. For me, the issue was that my Procfile was named "procfile" and not "Procfile"

- 51
- 5
-
Thanks for this. The guide I was following specifically said to name it `procfile` and I could not figure out why it wasn't being recognized. – Abandoned Cart Oct 06 '19 at 14:22
So the issue was that Heroku only builds off the master branch and I was developing on a different branch. I solved this by assigning my current branch as the master branch git push heroku YourDifferentBranchHere:master

- 95
- 1
- 9
The issue was easily solved for me once I changed the procfile
name to Procfile
.
After this I wrote the following code:
worker: node bot.js
$ heroku ps:scale web=1 worker=5
heroku ps:scale web=1 worker=5
Then I refreshed the page, it worked perfectly for me.

- 1