Python 3.6 - heroku本地命令找不到Procfile - 帮助排除错误消息

时间:2018-01-09 14:29:18

标签: django python-3.x heroku null local

我想在部署到Heroku服务器之前获得我的Django应用程序的工作示例。如果我运行python manage.pyheroku open网站运行没有问题。当我尝试运行heroku local web时,出现以下错误:

C:\Users\Jup\Drop>heroku local web
[OKAY] Loaded ENV .env File as KEY=VALUE Format
[WARN] Cannot read property '1' of null
[FAIL] No Procfile and no package.json file found in Current Directory - See run_foreman.js --help

我的Procfile肯定存在于我的.env文件和我的manage.py文件所在的根目录中。然后我尝试heroku local -f Profile强制在一个位置搜索Procfile(默认为当前文件夹),我得到一个类似的错误:

C:\Users\Jup\Drop>heroku local -f Procfile
[WARN] Cannot read property '1' of null
[FAIL] No Procfile and no package.json file found in Current Directory - See heroku.js --help
 !    Cannot convert undefined or null to object

它仍然无法找到该文件,我不知道它正在寻找什么.json文件。我在我的目录中搜索“null”,我的bootstrap中有一堆文件有这个名字,但它只是一个警告,我不确定是否重要。如果你能帮助我排除故障,或指出我正确的方向,我真的很感激。我的项目目录如下:

  

项目目录

Root Directory(Drop)/
  -Buylist/
      --apps
      --templates
  -project/
      --settins
      --views etc.
  -.env
  -manage.py
  -Pipfile
  -Pipfile.lock
  -Procfile
  

Procfile

web: gunicorn project.wsgi
worker: celery worker -E --app=project.celery.app

我不确定您可能需要的其他信息,但我可以提供。请告诉我!

0 个答案:

没有答案
相关问题