Проблема развертывания приложения Django Rest Framework на Heroku
Я пытаюсь развернуть простое приложение на Heroku, и недавно начал получать следующую ошибку:
remote: -----> $ python manage.py collectstatic --noinput
remote: Post-processing 'drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js' failed!
remote: Traceback (most recent call last):
remote: File "/tmp/build_33d50075/manage.py", line 22, in <module>
remote: main()
remote: File "/tmp/build_33d50075/manage.py", line 18, in main
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute
remote: self.fetch_command(subcommand).run_from_argv(self.argv)
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/base.py", line 373, in run_from_argv
remote: self.execute(*args, **cmd_options)
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/core/management/base.py", line 417, in execute
remote: output = self.handle(*args, **options)
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
remote: collected = self.collect()
remote: File "/app/.heroku/python/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 134, in collect
remote: raise processed
remote: whitenoise.storage.MissingFileError: The file 'drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f4a4526efb0>.
remote: The JS file 'drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js' references a file which could not be found:
remote: drf-yasg/swagger-ui-dist/swagger-ui-es-bundle.js.map
remote: Please check the URL references in this JS file, particularly any
remote: relative paths which might be pointing to the wrong location.
remote:
remote: ! Error while running '$ python manage.py collectstatic --noinput'.
remote: See traceback above for details.
remote:
remote: You may need to update application code to resolve this error.
remote: Or, you can disable collectstatic for this application:
remote:
remote: $ heroku config:set DISABLE_COLLECTSTATIC=1
remote:
remote: https://devcenter.heroku.com/articles/django-assets
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to boundless-ea.
remote:
Я не помню, чтобы вносил изменения, которые вызвали эту ошибку. Я пытаюсь динамически генерировать документы API из моего приложения Django на Heroku.
В нем говорится, что я использую этот бэкенд для хранения статических файлов whitenoise.storage.CompressedManifestStaticFilesStorage, но на самом деле в коде у меня установлен вот этот: STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'
Как я могу исправить это, чтобы мое приложение было развернуто?
Когда я запускаю collectstatic локально, он работает нормально. Я использую Django 4.0, и whitenoise 5.3.0. и вот мой файл настроек: