yourlabs/django-autocomplete-light

Missing sourcemap for `nucleus.css`

adamchainz opened this issue · 3 comments

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

Did you consider reporting this to select2?

Looks like this got fixed somehow - installing 3.9.7 works.

jpic commented

Removed submodule in 227cc34