Not a supported stylesheet MIME type

Post Reply
Stefan.Herrmann
Posts: 5
Joined: 12 Aug 2021, 08:13

12 Aug 2021, 11:16

I have the Barcelona theme and it works fine when i extract it from the zip file, install the modules and run it.
But when I commit the files to our local Bitbucket and check them out again t won't work any more because i get a "Not supported stylesheet MIME type"

Refused to apply style from 'http://localhost:4200/assets/theme/theme-blue-grey.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Refused to apply style from 'http://localhost:4200/assets/layout/css ... e-grey.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

They are referenced in the index.html like this:

Code: Select all

<link id="theme-css" rel="stylesheet" type="text/css" href="assets/theme/theme-blue-grey.css">
<link id="layout-css" rel="stylesheet" type="text/css" href="assets/layout/css/layout-blue-grey.css">
I have compared the files between the original ZIP and the checked out version. They are basically identical besides the Unix / Windows encoding.

Stefan.Herrmann
Posts: 5
Joined: 12 Aug 2021, 08:13

12 Aug 2021, 21:32

I found the solution on my own. The .gitignore file that was part of the original ZIP states that the following folder shall be ignored:
src/assets/sass/theme/designer

Hence this folder was missing after the checkout but it is required for the site to work properly.

merve7
Posts: 808
Joined: 12 Sep 2017, 10:44

16 Aug 2021, 10:01

Hi,

Glad to hear you find the solution. If you use github repository, you can remove that line (src/assets/sass/theme/designer) from ignore file.

Post Reply

Return to “Barcelona - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest