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

Whitenoise crash in Docker image building from missing Bootstrap .map file #2004

Closed
mikkonie opened this issue Sep 16, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc.
Milestone

Comments

@mikkonie
Copy link
Contributor

Dump of error in comments. Nothing has changed in the include files themselves, so this must be a problem with the currently used version of Whitenoise. Not the first time we've encountered something similar.

Dump of crash in comments. See also #1666, #1992.

@mikkonie mikkonie added bug Something isn't working environment Issues of dependencies, CI, deployment etc. labels Sep 16, 2024
@mikkonie mikkonie added this to the v1.0.0 milestone Sep 16, 2024
@mikkonie mikkonie self-assigned this Sep 16, 2024
@mikkonie
Copy link
Contributor Author

Crash log:

 > [14/16] RUN cd /usr/src/app &&     DJANGO_SECRET_KEY=for-build-only     DJANGO_SETTINGS_MODULE=config.settings.production     DATABASE_URL=postgres://sodar:sodar@fake/sodar     python manage.py collectstatic --no-input:
#16 1.535 Post-processing 'local/css/bootstrap.min.css' failed!
#16 1.535
#16 1.535 Traceback (most recent call last):
#16 1.535   File "/usr/src/app/manage.py", line 28, in <module>
#16 1.535     execute_from_command_line(sys.argv)
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
#16 1.535     utility.execute()
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
#16 1.535     self.fetch_command(subcommand).run_from_argv(self.argv)
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
#16 1.535     self.execute(*args, **cmd_options)
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
#16 1.535     output = self.handle(*args, **options)
#16 1.535              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
#16 1.535     collected = self.collect()
#16 1.535                 ^^^^^^^^^^^^^^
#16 1.535   File "/usr/local/lib/python3.11/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 154, in collect
#16 1.536     raise processed
#16 1.536 whitenoise.storage.MissingFileError: The file 'local/css/bootstrap.min.css.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f2c6856ec90>.
#16 1.536
#16 1.536 The CSS file 'local/css/bootstrap.min.css' references a file which could not be found:
#16 1.536   local/css/bootstrap.min.css.map
#16 1.536
#16 1.536 Please check the URL references in this CSS file, particularly any
#16 1.536 relative paths which might be pointing to the wrong location.
#16 1.536
------
process "/bin/sh -c cd /usr/src/app &&     DJANGO_SECRET_KEY=for-build-only     DJANGO_SETTINGS_MODULE=config.settings.production     DATABASE_URL=postgres://sodar:sodar@fake/sodar     python manage.py collectstatic --no-input" did not complete successfully: exit code: 1

@mikkonie
Copy link
Contributor Author

Fixed by adding the missing *.map files in Dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working environment Issues of dependencies, CI, deployment etc.
Projects
None yet
Development

No branches or pull requests

1 participant