Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingFileError for location_field/Leaflet.GoogleMutant.js.map #168

Closed
jvacek opened this issue May 13, 2023 · 3 comments
Closed

MissingFileError for location_field/Leaflet.GoogleMutant.js.map #168

jvacek opened this issue May 13, 2023 · 3 comments

Comments

@jvacek
Copy link

jvacek commented May 13, 2023

I think this might be my own configuration issue actually. I have installed the app into the cookiecutter django project with whitenoise enabled, and it's failing on this file when trying to build my production docker environment (local collectstatic works fine)

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
@jvacek
Copy link
Author

jvacek commented May 15, 2023

The only reference to the file I can find is here

this.path + '/Leaflet.GoogleMutant.js',

@leikoilja
Copy link

Started to see this issue as well now.
Suspect that it was introduced in https://github.com/caioariede/django-location-field/pull/157/files but i didn't dive into the implementation.
Rollback to django-location-field==2.1.1 fixed it for me, for the time being

@caioariede
Copy link
Owner

This has been fixed in version 2.7.1 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants