我有一个应用程序我想部署在Heroku上。还没有完成,但现在是我老师的要求了。我在heroku上创建了一个帐户和应用程序,并使用了GitHub部署方法,但是当我单击deploy分支时,会出现以下类型的错误:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/build_0f3c3e792cd2015b5d316aad8cf28d6c/static'
! Error while running '$ python manage.py collectstatic --noinput'
我使用Python,JS,React,Django .When创建了一个网站,我通过github部署在Heroku上,出现了一个错误: -----> Determining which buildpack to use for this app
! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
Detected buildpacks: Python
我正试着在Heroku上上传我的django应用程序。它在本地可以工作,因为我纠正了错误,但由于某种原因,我添加了whitenoise来获取本地文件,以便可以在Heroku上部署,但它总是出现相同的错误。我正在加载一个本地包csv-imports,它在第70行有一个错误。 class ImportModel(models.Model):
""" Optional one to one mapper of import file to Model """
#this is the line with the error and I
当我尝试将我的django应用程序部署到heroku时,部署将失败,并显示以下错误消息
Traceback (most recent call last):
File "manage.py", line 11, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the follo
ImportError: Could not import settings 'settings.prod' (Is it on sys.path? Is there an import error in the settings file?)
我在2013-2014年构建了这个应用程序,从那以后就没有太多的维护。但现在有一个问题,一些AWS密钥需要更改,但我无法部署应用程序。
除非我这样做,否则git push heroku master会导致构建失败
heroku config:set DISABLE_COLLECTSTATIC=0
所以,我这样做了,我知道这可能会破坏网站