django-cms / djangocms-frontend

django CMS frontend is a plugin bundle for django CMS providing several components for the frontend, currently implemented with the popular Bootstrap 5 framework.
Other
55 stars 22 forks source link

Error when building - Post-processing 'djangocms_frontend/icon/vendor/assets/stylesheets/happy-icons.min.css' failed! #180

Closed jpeg2600 closed 10 months ago

jpeg2600 commented 10 months ago

I run into the following error when trying to build, after running docker compose build web:

 => ERROR [web 5/5] RUN python manage.py collectstatic --noinput                                                                                                                                            5.3s
------
 > [web 5/5] RUN python manage.py collectstatic --noinput:
4.771 Post-processing 'djangocms_frontend/icon/vendor/assets/stylesheets/happy-icons.min.css' failed!
4.771
4.771 Traceback (most recent call last):
4.771   File "/app/manage.py", line 22, in <module>
4.772     main()
4.772   File "/app/manage.py", line 18, in main
4.772     execute_from_command_line(sys.argv)
4.772   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
4.772     utility.execute()
4.772   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
4.772     self.fetch_command(subcommand).run_from_argv(self.argv)
4.772   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
4.772 Found another file with the destination path 'admin/img/search.svg'. 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.
4.772     self.execute(*args, **cmd_options)
4.772   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
4.773     output = self.handle(*args, **options)
4.773              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4.773   File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
4.773     collected = self.collect()
4.773                 ^^^^^^^^^^^^^^
4.773   File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 154, in collect
4.773     raise processed
4.773 whitenoise.storage.MissingFileError: The file 'djangocms_frontend/icon/vendor/assets/fonts/happy-icons.woff2' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fea26fbb4d0>.
4.773
4.773 The CSS file 'djangocms_frontend/icon/vendor/assets/stylesheets/happy-icons.min.css' references a file which could not be found:
4.773   djangocms_frontend/icon/vendor/assets/fonts/happy-icons.woff2
4.773
4.773 Please check the URL references in this CSS file, particularly any
4.773 relative paths which might be pointing to the wrong location.
4.773
------
failed to solve: process "/bin/sh -c python manage.py collectstatic --noinput" did not complete successfully: exit code: 1
fsbraun commented 10 months ago

@jpeg2600 Thanks for reporting this. Indeed the pinned release of djangocms-frontend is broken when used with whitenoise. Will update djangocms-frontend and the pinning in django-cms-quickstart