Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Application fails to load with MIME Type error after applying theme

DaveArchNov 1 2019 — edited Nov 1 2019

Node version: 12.13.0

NPM version: 6.12.0

OJet version: 7.2.0

After applying a theme and serving using 'ojet serve --theme=<theme>' the application fails to load properly.

The application styling is not correct and the following error is seen in the console in Firefox (similar error in Chrome):

Refused to apply style from 'http://<host>/css/<theme>/0.0.1/web/<theme>.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Within the /web/index.html file, the stylesheet has the following entry:

<link rel="stylesheet" href="css/<theme>/0.0.1/web/<theme>.css" id="css" />

This is automatically added when the application is served.

I've tried manually adding type="text/css" to the stylesheet link but this makes no difference.

Any help greatly appreciated.

Comments
Post Details
Added on Nov 1 2019
1 comment
1,298 views