ValueError: Missing staticfiles manifest entry for 'css/theme-style.css' Deploy in Heroku

Viewed 37

I have a Django system that already works on Heroku and recently I needed to do some updates on this system, it turns out that now, when I try to upload it again to Heroku I'm getting an error in this deploy. Apparently Heroku can't report that it can't find the file "css/theme-style.css"

When facing this problem, I made a clone of the system that is currently working and I tried to upload it again changing only a commented line "#hello" inserted in the views, when deploying the system "no changes" other than "#hello" and the same error is being presented (which leads me to believe that the problem is not in my updates).

These are my file settings:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'accounts',
    'core',
    'users',
    'widget_tweaks',

    'whitenoise.runserver_nostatic',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',

    'whitenoise.middleware.WhiteNoiseMiddleware',
    "core.error_handler.ErrorHandlerMiddleware",
]

STATIC_URL = '/static/'
STATIC_ROOT = '/core/static/' #looks weird, but it's located in this folder
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

When I try to run with 'heroku local' the same error is displayed.

Have you ever had this situation when deploying to Heroku?

0 Answers
Related