My Django project was running locally before. But today I am not able to server my app locally. I am getting this error “compressor.exceptions.UncompressableFileError: ‘css/style.css’ could not be found in the COMPRESS_ROOT ‘/Users/khushmeeet/dev/codex/staticfiles’ or with staticfiles.”
I have tried running collectstatic. But getting the following error
❯ python manage.py collectstatic
0 static files copied to '/Users/khushmeeet/dev/codex/staticfiles'.
I then ran find static command, to see where Django is looking for static files. But that failed too.
❯ python manage.py findstatic --verbosity 3 css/style.css
No matching file found for 'css/style.css'.
Looking in the following locations:
/Users/khushmeeet/dev/codex/staticfiles
One more thing, I am using SCSS for my CSS files. Could this be an issue?
I am stuck here for far too long, and it’s frustrating, because I have tried everything, that I cloud, but still not able to locate the problem. Really appreciate, if someone could tell me, what is going on here?
Here are my project details -
├── codex
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── db.sqlite3
├── main
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── forms.py
│ ├── migrations
│ ├── models.py
│ ├── static
│ ├── templates
│ ├── tests.py
│ ├── urls.py
│ └── views.py
├── manage.py
└── templates
├── base.html
└── footer.html
My settings.py file
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'compressor',
'widget_tweaks',
'main'
]
STATICFILES_FINDERS = [
'compressor.finders.CompressorFinder'
]
STATICFILES_DIRS = [
'main/static',
]
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')