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

python manage.py collectstatic - error with jazzmin. #465

Closed
willianmascimiano opened this issue Nov 12, 2022 · 8 comments · Fixed by codyfletcher/django-jazzmin-fork#1 or #474
Closed

Comments

@willianmascimiano
Copy link

willianmascimiano commented Nov 12, 2022

If i install in settings.py the jazzmin moodule, the system will crash on collectstatic command.

if i use the original django-admin interface the collectstatic command works

The CSS file 'vendor/bootswatch/default/bootstrap.min.css' references a file which could not be found:
vendor/bootswatch/default/bootstrap.min.css.map. Please check the URL references in this CSS file, particularly any relative paths which might be pointing to the wrong location.

@willianmascimiano
Copy link
Author

willianmascimiano commented Nov 15, 2022

`
willian@n4050:~/Documentos/dev/solarcore$ python3 manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

/home/willian/Documentos/dev/solarcore/staticfiles

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Found another file with the destination path 'admin/js/popup_response.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin/js/cancel.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Post-processing 'vendor/bootswatch/default/bootstrap.min.css' failed!

Traceback (most recent call last):
File "/home/willian/Documentos/dev/solarcore/manage.py", line 22, in
main()
File "/home/willian/Documentos/dev/solarcore/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/willian/.local/lib/python3.10/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/home/willian/.local/lib/python3.10/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/willian/.local/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/willian/.local/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/home/willian/.local/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
collected = self.collect()
File "/home/willian/.local/lib/python3.10/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 154, in collect
raise processed
whitenoise.storage.MissingFileError: The file 'vendor/bootswatch/default/bootstrap.min.css.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fbfc834b9d0>.

The CSS file 'vendor/bootswatch/default/bootstrap.min.css' references a file which could not be found:
vendor/bootswatch/default/bootstrap.min.css.map

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

@willianmascimiano
Copy link
Author

This error occours after i use django > 4.1.*

After use django==4.0.8 it works.

@johncronan
Copy link

It is the same issue as dealt with by the DRF project, here: encode/django-rest-framework#8587

Apparently the Django 4.1 changes to static files cause this issue with references to missing source maps. Here's the reference:

/*# sourceMappingURL=bootstrap.min.css.map */

@sausax
Copy link

sausax commented Dec 6, 2022

Any idea how to fix this ?

@johncronan
Copy link

@farridav, easy fix here. We gotta remove that line, or provide the source map.

@farridav
Copy link
Owner

farridav commented Dec 6, 2022

If anyone wants to make a PR with that map file in I'll gladly review and merge, if not, ill get this on my to-do list as soon as is possible..

@leandrodesouzadev
Copy link

Is there any plans to release a new version with this change?
The 2.6.0 release (latest) doesn't contain this change.

@shywn-mrk
Copy link

I would be more than happy to see the new release that contains those changes.
@farridav

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