我試圖通過Flynn設置Cabot,這基本上就像一個內部的heroku。 當我部署eveything並嘗試運行它時,我得到這個異常。脫機生成錯誤 - Django壓縮機
OfflineGenerationError: You have offline compression enabled but key "88dbbdf7c5e6ceca63a19023be40a840" is missing from offline manifest. You may need to run "python manage.py compress".
我讀here對於COMPRESS_ROOT路徑可能不是絕對的,這可能是問題,但是當我檢查,我在日誌中得到這些。對我來說似乎絕對。
[2017-07-28T13:50:24.4Z] ('\n \n \n \n STATIC & CCOMPRESS ARE ', '/app/cabot/collectedstatic/', '\n \n \n \n ')
[2017-07-28T13:50:24.532943Z] ('\n \n \n \n STATIC & CCOMPRESS URL ARE ', '/static/', '\n \n \n \n ')
我試着在構建過程中運行manage.py compress並得到以下錯誤。
當我跑manage.py壓縮
Invalid template /app/.heroku/python/lib/python2.7/site-packages/django_filters/templates/django_filters/rest_framework/crispy_form.html: 'crispy_forms_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
compress
extra
i18n
jsonify
l10n
log
polymorphic_admin_tags
polymorphic_formset_tags
rest_framework
static
staticfiles
tz
Invalid template /app/.heroku/python/lib/python2.7/site-packages/rest_framework/templates/rest_framework/filters/django_filter_crispyforms.html: 'crispy_forms_tags' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
admin_urls
cache
compress
extra
i18n
jsonify
l10n
log
polymorphic_admin_tags
polymorphic_formset_tags
rest_framework
static
staticfiles
tz
Found 'compress' tags in:
/tmp/build/app/cabot/templates/cabotapp/shift_list.html
/tmp/build/app/cabot/templates/cabotapp/statuscheck_detail.html
/tmp/build/app/cabot/templates/registration/logout.html
/tmp/build/app/cabot/templates/cabotapp/about.html
/tmp/build/app/cabot/templates/cabotapp/setup.html
/tmp/build/app/cabot/templates/cabotapp/statuscheckresult_detail.html
/tmp/build/app/cabot/templates/cabotapp/instance_list.html
/tmp/build/app/cabot/templates/cabotapp/instance_confirm_delete.html
/tmp/build/app/cabot/templates/cabotapp/statuscheck_report.html
/tmp/build/app/cabot/templates/cabotapp/service_list.html
/tmp/build/app/cabot/templates/cabotapp/instance_detail.html
/tmp/build/app/cabot/templates/cabotapp/plugin_settings_form.html
/tmp/build/app/cabot/templates/cabotapp/alertpluginuserdata_form.html
/tmp/build/app/cabot/templates/registration/login.html
/tmp/build/app/cabot/templates/cabotapp/statuscheck_list.html
/tmp/build/app/cabot/templates/404.html
/tmp/build/app/cabot/templates/cabotapp/instance_form.html
/tmp/build/app/cabot/templates/cabotapp/subscriptions.html
/tmp/build/app/cabot/templates/cabotapp/service_detail.html
/tmp/build/app/cabot/templates/base.html
/tmp/build/app/cabot/templates/cabotapp/statuscheck_form.html
/tmp/build/app/cabot/templates/cabotapp/service_confirm_delete.html
/tmp/build/app/cabot/templates/cabotapp/statuscheck_confirm_delete.html
/tmp/build/app/cabot/templates/cabotapp/service_form.html
Compressing... CommandError: An error occurred during rendering /tmp/build/app/cabot/templates/cabotapp/shift_list.html: /bin/sh: 1: lessc: not found
奇怪的是,如果我對我的本地搬運工運行它,它完美地運行。我試圖在這裏拋棄docker部分並使用procfile使用heroku像構建過程一樣運行。 不知道解決方案可能是什麼。
它最後說「lessc not found」,那麼,也許它沒有找到lessc? :)「無效的模板」消息對我來說看起來不是一個嚴重錯誤。 – karyon