Please point me to the right direction with a Django app that I am trying to put on Heroku. The app runs locally (both with python manage.py run server
and heroku local
), but doesn't run on heroku. It seems the root problem stems from whitenoise
and I get errors doing collectstatic
. BTW, whitenoise
setup was done following the steps here for using whitenoise
with Django. (app repo is here.)
Through various searches I found this that suggests setting the Node version on Heroku to use the same one used locally, but I am not using npm
nor node
. I tried the kill process
tip from here, but that didn't help. Neither did heroku restart
.
Doing python manage.py collectstatic --noinput
got me these error messages:
Traceback (most recent call last):
File "/Volumes/Volume2/dev/student_manage_csp/manage.py", line 22, in <module>
main()
File "/Volumes/Volume2/dev/student_manage_csp/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
utility.execute()
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/core/management/base.py", line 373, in run_from_argv
self.execute(*args, **cmd_options)
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/core/management/base.py", line 417, in execute
output = self.handle(*args, **options)
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
collected = self.collect()
File "/Volumes/Volume2/dev/student_manage_csp/venv/lib/python3.9/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 134, in collect
raise processed
whitenoise.storage.MissingFileError: The file 'admin-lte/plugins/pdfmake/FileSaver.min.js.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x104531850>.
The JS file 'admin-lte/plugins/pdfmake/pdfmake.js' references a file which could not be found:
admin-lte/plugins/pdfmake/FileSaver.min.js.map