You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed https://github.com/caioariede/django-location-field in my project as directed, but I am struggling to deploy my production as it fails on the collectstatic step. Locally, I can collect the statics just fine, but not when running the production step.
I am not sure if I missed a step in the docs, whether I need to do something for Whitenoise to pick the files up correctly, or whether there's something wrong with the package itself
# docker-compose -f production.yml run --rm django python manage.py collectstatic
Post-processing 'location_field/Leaflet.GoogleMutant.js' failed!
Traceback (most recent call last):
File "/app/manage.py", line 31, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
collected = self.collect()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 154, in collect
raise processed
whitenoise.storage.MissingFileError: The file 'location_field/Leaflet.GoogleMutant.js.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f7c720ba5d0>.
The JS file 'location_field/Leaflet.GoogleMutant.js' references a file which could not be found:
location_field/Leaflet.GoogleMutant.js.map
Please check the URL references in this JS file, particularly any
relative paths which might be pointing to the wrong location.
I can see the file is present where it should be
# docker-compose -f production.yml run --rm django ls "/usr/local/lib/python3.11/site-packages/location_field/static/location_field"
Starting flamerelay_postgres_1 ... done
Starting flamerelay_redis_1 ... done
PostgreSQL is available
@googlemaps Leaflet.GoogleMutant.js js leaflet leaflet-geosearch leaflet-src.js.map
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have installed https://github.com/caioariede/django-location-field in my project as directed, but I am struggling to deploy my production as it fails on the
collectstatic
step. Locally, I can collect the statics just fine, but not when running the production step.I am not sure if I missed a step in the docs, whether I need to do something for Whitenoise to pick the files up correctly, or whether there's something wrong with the package itself
I can see the file is present where it should be
Beta Was this translation helpful? Give feedback.
All reactions