# MIME type ('text/html') is not a supported stylesheet MIME type (is not executable)

**URL:** <https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621>\
**Category:** Templates & Frontend\
**Created:** [March 17, 2025, 7:23am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621 "2025-03-17T07:23:50Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 7:23am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/1 "2025-03-17T07:23:50Z")

</div>

Hi, guys! I downloaded the [project from Github](https://github.com/l4rm4nd/VoucherVault) and faced the problem, that my styles, scripts, images aren’t applied. I get errors of the following kind:

```auto
Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

```

```auto
Refused to execute script from 'http://127.0.0.1:8000/static/assets/vendor/chart.js/chart.umd.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

```

Structure of the project:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/6/6/66d4967f276a40a59a6104eb8ab91adb097345e3.png)

STATIC\_URL setting:

```auto
STATIC_URL = '/static/'

```

example of dynamic links in base.html:

```auto
<!-- Vendor CSS Files -->
  <link href="{% static 'assets/vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/bootstrap-icons/bootstrap-icons.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/boxicons/css/boxicons.min.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/quill/quill.snow.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/quill/quill.bubble.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/remixicon/remixicon.css' %}" rel="stylesheet">
  <link href="{% static 'assets/vendor/simple-datatables/style.css' %}" rel="stylesheet">

  <!-- Template Main CSS File -->
  <link href="{% static 'assets/css/style.css' %}" rel="stylesheet">
  <link href="{% static 'assets/css/dark-mode.css' %}" rel="stylesheet">

```

I would be very grateful if you can help solve the problem 🙏

---

<div class="post-metadata">

**Author:** ![boxed](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/boxed/32/11975_2.png) [@boxed](https://forum.djangoproject.com/u/boxed)\
**Post date:** [March 17, 2025, 7:35am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/2 "2025-03-17T07:35:29Z")

</div>

Try going to that url in your browser. I’m going to bet it’s a 404 page.

I’m going to just guess you should install whitenoise.

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 8:50am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/3 "2025-03-17T08:50:01Z")

</div>

yeah, i have 404 error..

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/f/4/f45cb26974e16d845bd1f9adc7544dc56e68ed52.png)

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 8:58am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/4 "2025-03-17T08:58:29Z")

</div>

I tried to install whitenoise and also specified it in settings.py in MIDDLEWARE `'whitenoise.middleware.WhiteNoiseMiddleware'`

Unfortunately, no positive results, still getting the error “Not found” (404).

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/b/4/b4e42b5663332fd594cfbf4d5008518e387e6d20.png)

---

<div class="post-metadata">

**Author:** ![abbasj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abbasj/32/11876_2.png) [@abbasj](https://forum.djangoproject.com/u/abbasj)\
**Post date:** [March 17, 2025, 9:28am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/5 "2025-03-17T09:28:07Z")

</div>

Try removing the trailing slash so that you have:

STATIC\_URL = “static/”

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 9:56am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/6 "2025-03-17T09:56:39Z")

</div>

problem not solved (

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/c/4/c451899262b2aba0deb4e5265c8590e251139fe4.png)

---

<div class="post-metadata">

**Author:** ![abbasj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abbasj/32/11876_2.png) [@abbasj](https://forum.djangoproject.com/u/abbasj)\
**Post date:** [March 17, 2025, 10:44am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/7 "2025-03-17T10:44:40Z")

</div>

I had a similar issue a few days ago and it was related to my JS files.

Check your chart.umd.js file because I think something is wrong in that file.

You can also share it and I’ll take a look

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 11:42am UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/8 "2025-03-17T11:42:53Z")

</div>

here is the [link to the chart.umd.js](https://drive.google.com/file/d/1pAm6Pk7FKLOgXR00lqlFd5KqVlOZDUkI/view?usp=sharing)  
thansk so much

---

<div class="post-metadata">

**Author:** ![abbasj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/abbasj/32/11876_2.png) [@abbasj](https://forum.djangoproject.com/u/abbasj)\
**Post date:** [March 17, 2025, 12:05pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/9 "2025-03-17T12:05:16Z")

</div>

Please update the question and add the code in ` `.

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 12:25pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/10 "2025-03-17T12:25:27Z")

</div>

i am not able to add the code in it, because body is limited to 32000 characters 🙃 My chart.umd.js has 207000…

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 17, 2025, 12:44pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/11 "2025-03-17T12:44:15Z")

</div>

Let’s take a step back for a moment and check a couple of fundamentals.

Is this your development environment using `runserver`, or your production environment using something like gunicorn or uwsgi?

Either way, your logs (or console in the case of `runsever`) should show the `404` codes along with the URL(s) being requested.

Please post **all** of the URLs being requested that are resulting in a 404.

From your settings.py file, please post the following settings:

- INSTALLED\_APPS
- MIDDLEWARE
- DEBUG
- STATICFILES\_DIRS

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 1:15pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/12 "2025-03-17T13:15:20Z")

</div>

Yes, it’s my development environment using `runserver`.

1. started my server:  

2. opened [http://127.0.0.1:8000/](http://127.0.0.1:8000/), so my login page opened:  

3. Logged in after entering username and password, base page opened:  

4. The same problems occur, when i visit all other pages of the application.  
dashboard:  

From **settings.py** file:

```auto
INSTALLED_APPS = [
    'myapp',
    'django_celery_beat',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

```

```auto
MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.locale.LocaleMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django_http_referrer_policy.middleware.ReferrerPolicyMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'csp.middleware.CSPMiddleware',
]

```

regarding DEBUG i have such snippet:

```auto
# get debug modus from env
DEBUG = os.environ.get('DEBUG', 'False').lower() in ['true']

```

I do not have `STATICFILES_DIRS`

Let my know if if any additional information is needed, thanks.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 17, 2025, 1:40pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/13 "2025-03-17T13:40:20Z")

</div>

For testing purposes, set `DEBUG = True` and try it again.

---

<div class="post-metadata">

**Author:** ![Beef](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/beef/32/27531_2.png) [@Beef](https://forum.djangoproject.com/u/Beef)\
**Post date:** [March 17, 2025, 1:53pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/14 "2025-03-17T13:53:33Z")

</div>

It works, I appreciate it, thanks so much

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [March 17, 2025, 1:54pm UTC](https://forum.djangoproject.com/t/mime-type-text-html-is-not-a-supported-stylesheet-mime-type-is-not-executable/39621/15 "2025-03-17T13:54:31Z")

</div>

Just keep in mind that this is for testing and development purposes only. When you’re ready to deploy this to a production environment, you will need to take other steps.
