yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.79k stars 466 forks source link

Missing sourcemap for `nucleus.css` #1322

Closed adamchainz closed 8 months ago

adamchainz commented 1 year ago

Some version between 3.9.5rc1 and 3.9.5rc6 added the file dal_select2/static/vendor/select2/docs/themes/learn2/css-compiled/nucleus.css. This file ends with a reference to its source map:

/*# sourceMappingURL=nucleus.css.map */

Since the source map file isn't in position, this causes collectstatic to fail when using the ManifestStaticFilesStorage on Django 4.1+. (I added the source map support, here's a related blog post). For example, using Whitenoise on top of Django:


Run python manage.py collectstatic --noinput
Post-processing 'vendor/select2/docs/themes/learn2/css-compiled/nucleus.css' failed!

Traceback (most recent call last):
...
whitenoise.storage.MissingFileError: The file 'vendor/select2/docs/themes/learn2/css-compiled/nucleus.css.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f5787c396d0>.

The CSS file 'vendor/select2/docs/themes/learn2/css-compiled/nucleus.css' references a file which could not be found:
  vendor/select2/docs/themes/learn2/css-compiled/nucleus.css.map

Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.

It's not clear the entire select2 directory needs to sit within vendor. If it does, the source map should be added, or the source map comment removed.

jpic commented 1 year ago

Did you consider reporting this to select2?

adamchainz commented 8 months ago

Looks like this got fixed somehow - installing 3.9.7 works.

jpic commented 6 months ago

Removed submodule in 227cc34