Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku procfile "No such process type web defined in Procfile" error

This is the first time I've used Heroku, and the fact that I can't find anyone in Google with a similar error to this means I'm likely doing something way wrong:

I'm following the basic Heroku setup guide here to get my NodeJS application deployed to the web. I'm deployed and trying to check my dynos with:

heroku ps:scale web=1

However, when I do this I get the error:

Scaling web dynos... failed
 !    No such process type web defined in Procfile.

When I run heroku ps I get nothing returned.

In my app's root directory, I have a file named Procfile (with no extension) which contains:

web: node app.js

The app runs locally without any issues (using foreman start).

Question is why is this occurring, how do I remedy it, should I even care?

like image 656
JVG Avatar asked Jul 25 '13 01:07

JVG


People also ask

Does Procfile need to be on root?

The Procfile must live in the root directory of the application. It will not function if placed anywhere else. Procfiles are used by Cloud Native Buildpacks to build docker image with start up scripts for each processes.

Is Procfile required?

A Procfile is not necessary to deploy most languages supported by Deis. The platform automatically detects the language and supplies a default web process type to boot the server. Creating an explicit Procfile is recommended for greater control and flexibility over your app.


1 Answers

Processes to be run on Heroku are defined in a simple text file called: Procfile

The Profile contains a line that defines how each of the processes in your application will run. This will be language specific and examples can be seen on the Heroku Devcenter Procfile article

Please note that the Procfile must be spelt exactly, with the first letter capitalized an all others lower case. There is no file extension for the Procfile. This Procfile should be placed in the root of your project and committed to your local git repository before doing a git push heroku master.

Should you mis-type the filename after it has been added to git, you can rename it using git with the command

git mv ProcFile Procfile

The renamed file will be staged so you can commit the changed file with the command

git commit -m "corrected name of Procfile"
like image 155
jr0cket Avatar answered Sep 19 '22 08:09

jr0cket