What is the reason for “Procfile declares types -> (none)” in Heroku?

前端 未结 11 1704
一整个雨季
一整个雨季 2020-12-14 09:06

I am trying to deploy a test app to Heroku --stack cedar but every time I do my Procfile is being ignored.

It should be saying this:

Procfile declare         


        
相关标签:
11条回答
  • 2020-12-14 09:20

    I had this error and tried all the solutions above but they did not work. Turns out that I had created the git repository in the root of the virtual environment. Which seems reckless but hey...

    So if you have tried all the solutions and they don't work check where you created your repository and make sure it is in the root of your project source code and not anywhere else.

    0 讨论(0)
  • 2020-12-14 09:28

    Make sure your Procfile does not have any extension.And if it has any you have to rename that file to Procfile without any extension and commit and check out the master

    0 讨论(0)
  • 2020-12-14 09:30

    this problem is mainly caused by the create Procfile command when it is run from the command prompt or terminal. I recommend you to create the Procfile manually.

    If you are using Visual Studio code then, click on the pipfile and then on the upper side click the create new file button and enter the name of the file as Procfile.

    Before doing this delete previous Procfile and also use the command git rm procfile -f in command prompt in your active virtual environment.

    if you are using any other IDE then open notepad and enter this line in it web: gunicorn mb_project.wsgi --log-file - after that save it as Procfile and put this file below your pipfile.

    here is the link of my files https://github.com/YashMarmat/message-board-app.git

    0 讨论(0)
  • 2020-12-14 09:33

    Make sure you don't give any extension to Procfile. I did and got similar error. Also check syntax. For e.g:

    web : sh setup.sh should be

    web: sh setup.sh

    0 讨论(0)
  • 2020-12-14 09:35

    The space between the Record name and the contents seems to be important:

    Use:

    web: python manage.py runserver

    and not

    web:python manage.py runserver

    0 讨论(0)
  • 2020-12-14 09:37

    I had the same problem and I just now I found what was wrong. I first accidently called the file ProcFile instead of Procfile. Simply renaming that file did not get picked up by git. I had to do a git rm ProcFile -f first and then add a new (correctly named) Procfile. After that, it got pushed correctly by git and got picked up correctly by Heroku.

    0 讨论(0)
提交回复
热议问题