cancel
Showing results for 
Search instead for 
Did you mean: 

Refuse to apply style error on home page

SOLVED

Refuse to apply style error on home page

Hi 

I have extended Magento blank theme and added a new product widget on home page with color swatches but browser console showing error and color swatches are not working .

Refused to apply style from 'https://www.example.com/pub/static/version1622459491/frontend/Vendor/theme/en_US/Magento_Swatches/cs...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

 

Can any one help me ?

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Refuse to apply style error on home page

@deepikawdev  Please refer to this for the required solution: https://github.com/dxmoto/site/issues/89

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

View solution in original post

6 REPLIES 6

Re: Refuse to apply style error on home page

@deepikawdev Please run the below commands.

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Refuse to apply style error on home page

Thanks for help.

but it's not working.

error in detail 

Compilation from source: LESS file is empty: frontend/Vendor/theme/en_US/Magento_Swatches/css/swatches.less
<pre>#1 Magento\Framework\View\Asset\PreProcessor\AlternativeSource->processContent() called at [vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php:114]
#2 Magento\Framework\View\Asset\PreProcessor\AlternativeSource->process() called at [vendor/magento/module-developer/Model/View/Asset/PreProcessor/PreprocessorStrategy.php:78]
#3 Magento\Developer\Model\View\Asset\PreProcessor\PreprocessorStrategy->process() called at [vendor/magento/framework/View/Asset/PreProcessor/Pool.php:77]
#4 Magento\Framework\View\Asset\PreProcessor\Pool->process() called at [vendor/magento/framework/View/Asset/Source.php:152]
#5 Magento\Framework\View\Asset\Source->preProcess() called at [vendor/magento/framework/View/Asset/Source.php:105]
#6 Magento\Framework\View\Asset\Source->getFile() called at [vendor/magento/framework/View/Asset/File.php:158]
#7 Magento\Framework\View\Asset\File->getSourceFile() called at [vendor/magento/framework/App/StaticResource.php:135]
#8 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#9 Magento\Framework\App\Bootstrap->run() called at [pub/static.php:13]
</pre>

 

 

Re: Refuse to apply style error on home page

@deepikawdev Which Magento version you are using currently?

If it's Magento > 2.3 then refer: https://github.com/dxmoto/site/issues/89

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Refuse to apply style error on home page

Hi @Sanjay Jethva 

I am using magento 2.4

 

 

Re: Refuse to apply style error on home page

@deepikawdev  Please refer to this for the required solution: https://github.com/dxmoto/site/issues/89

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: Refuse to apply style error on home page

Hi @Sanjay Jethva ,

Thanks for your help! 

My problem has been solved Smiley Happy